From 03e628b9a6d9115f7d8f3541f60efbacf86025f5 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 11 May 2016 18:59:27 +0800 Subject: [PATCH] windows no chown on log file generation https://github.com/warmcat/libwebsockets/issues/524 Signed-off-by: Andy Green --- lib/context.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/context.c b/lib/context.c index 9f1e8341..02f18cdd 100644 --- a/lib/context.c +++ b/lib/context.c @@ -448,11 +448,13 @@ lws_create_vhost(struct lws_context *context, info->log_filepath); goto bail; } +#ifndef WIN32 if (context->uid != -1) if (chown(info->log_filepath, context->uid, context->gid) == -1) lwsl_err("unable to chown log file %s\n", info->log_filepath); +#endif } else vh->log_fd = LWS_INVALID_FILE; #endif