win32-daemon breakage when merged to pu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
<sys/poll.h> 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 <regex.h>
 #include <utime.h>
 #include <syslog.h>
-#ifndef __MINGW32__
-#include <sys/wait.h>
 #ifndef NO_SYS_POLL_H
 #include <sys/poll.h>
 #else
 #include <poll.h>
 #endif
+#ifndef __MINGW32__
+#include <sys/wait.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
 #include <termios.h>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]