From: Erik Faye-Lund Date: Tue, 09 Nov 2010 10:32:41 GMT Subject: win32-daemon breakage when merged to pu Message-ID: The last commit in 'ef/mingw-daemon' (a666b47) builds just fine for me, but the commit merging it (683df47: "Merge branch 'ef/mingw-daemon' into pu") does not: $ make CC daemon.o daemon.c: In function 'service_loop': daemon.c:885: error: invalid application of 'sizeof' to incomplete type 'struct pollfd' daemon.c:888: error: invalid use of undefined type 'struct pollfd' daemon.c:888: error: dereferencing pointer to incomplete type daemon.c:889: error: invalid use of undefined type 'struct pollfd' daemon.c:889: error: dereferencing pointer to incomplete type daemon.c:889: error: 'POLLIN' undeclared (first use in this function) daemon.c:889: error: (Each undeclared identifier is reported only once daemon.c:889: error: for each function it appears in.) daemon.c:899: warning: implicit declaration of function 'poll' daemon.c:909: error: invalid use of undefined type 'struct pollfd' daemon.c:909: error: dereferencing pointer to incomplete type daemon.c:918: error: invalid use of undefined type 'struct pollfd' daemon.c:918: error: dereferencing pointer to incomplete type make: *** [daemon.o] Error 1 This is because the merge-commit (683df47) moves the inclusion of inside the "#ifndef __MINGW32__"-block, effectively undoing part of fdc1211 ("mingw: use poll-emulation from gnulib"). I'm guessing this is because of a conflict with 2844923 ("add support for the SUA layer (interix; windows)"). I supposed the correct conflict-resolution would be to keep Markus' new conditional inclusion, but move it to the location I changed it to. With this patch on top it compiles just fine for me: diff --git a/git-compat-util.h b/git-compat-util.h index 652e9b5..490f969 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -105,13 +105,13 @@ #include #include #include -#ifndef __MINGW32__ -#include #ifndef NO_SYS_POLL_H #include #else #include #endif +#ifndef __MINGW32__ +#include #include #include #include