git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* win32-daemon breakage when merged to pu
@ 2010-11-09 10:32 Erik Faye-Lund
  2010-11-09 15:42 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Erik Faye-Lund @ 2010-11-09 10:32 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git Mailing List, Markus Duft

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>

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: win32-daemon breakage when merged to pu
  2010-11-09 10:32 win32-daemon breakage when merged to pu Erik Faye-Lund
@ 2010-11-09 15:42 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2010-11-09 15:42 UTC (permalink / raw)
  To: kusmabite; +Cc: Git Mailing List, Markus Duft

Erik Faye-Lund <kusmabite@gmail.com> writes:

> 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:

Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-09 15:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-09 10:32 win32-daemon breakage when merged to pu Erik Faye-Lund
2010-11-09 15:42 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).