]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Disable FD_CLOEXEC code on windows
authorPatrick von Reth <vonreth@kde.org>
Mon, 11 Mar 2013 09:33:07 +0000 (10:33 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 16 Mar 2013 15:49:54 +0000 (16:49 +0100)
util.c

diff --git a/util.c b/util.c
index dd31324cb08dcf85f336f9779a2293a108a186ca..ad0f0401daa5aeb68247092264ec9fffe49f7556 100644 (file)
--- a/util.c
+++ b/util.c
@@ -49,11 +49,13 @@ init_log(void)
        }
        logfile = fopen(conf->log_file, "a");
        if (logfile) {
+#ifndef _WIN32
                int fd = fileno(logfile);
                int flags = fcntl(fd, F_GETFD, 0);
                if (flags >= 0) {
                        fcntl(fd, F_SETFD, flags | FD_CLOEXEC);
                }
+#endif
                return true;
        } else {
                return false;