{"thread":{"id":"25686","subject":"win32-daemon breakage when merged to pu","startedAt":"2010-11-09T10:32:41Z","lastAt":"2010-11-09T15:42:46Z","messageCount":2,"participants":["Erik Faye-Lund","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"155472","messageId":"AANLkTikXv8BhW-fz=pZ5iS6rHJB5mxMUhk0KFO3JSwWv@mail.gmail.com","threadId":"25686","inReplyTo":null,"subject":"win32-daemon breakage when merged to pu","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2010-11-09T10:32:41Z","receivedAt":"2010-11-09T10:32:41Z","isPatch":false,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"The last commit in 'ef/mingw-daemon' (a666b47) builds just fine for\nme, but the commit merging it (683df47: \"Merge branch\n'ef/mingw-daemon' into pu\") does not:\n\n$ make\n    CC daemon.o\ndaemon.c: In function 'service_loop':\ndaemon.c:885: error: invalid application of 'sizeof' to incomplete type 'struct\npollfd'\ndaemon.c:888: error: invalid use of undefined type 'struct pollfd'\ndaemon.c:888: error: dereferencing pointer to incomplete type\ndaemon.c:889: error: invalid use of undefined type 'struct pollfd'\ndaemon.c:889: error: dereferencing pointer to incomplete type\ndaemon.c:889: error: 'POLLIN' undeclared (first use in this function)\ndaemon.c:889: error: (Each undeclared identifier is reported only once\ndaemon.c:889: error: for each function it appears in.)\ndaemon.c:899: warning: implicit declaration of function 'poll'\ndaemon.c:909: error: invalid use of undefined type 'struct pollfd'\ndaemon.c:909: error: dereferencing pointer to incomplete type\ndaemon.c:918: error: invalid use of undefined type 'struct pollfd'\ndaemon.c:918: error: dereferencing pointer to incomplete type\nmake: *** [daemon.o] Error 1\n\nThis is because the merge-commit (683df47) moves the inclusion of\n<sys/poll.h> inside the \"#ifndef __MINGW32__\"-block, effectively\nundoing part of fdc1211 (\"mingw: use poll-emulation from gnulib\").\n\nI'm guessing this is because of a conflict with 2844923 (\"add support\nfor the SUA layer (interix; windows)\").\n\nI supposed the correct conflict-resolution would be to keep Markus'\nnew conditional inclusion, but move it to the location I changed it\nto. With this patch on top it compiles just fine for me:\n\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex 652e9b5..490f969 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -105,13 +105,13 @@\n #include <regex.h>\n #include <utime.h>\n #include <syslog.h>\n-#ifndef __MINGW32__\n-#include <sys/wait.h>\n #ifndef NO_SYS_POLL_H\n #include <sys/poll.h>\n #else\n #include <poll.h>\n #endif\n+#ifndef __MINGW32__\n+#include <sys/wait.h>\n #include <sys/socket.h>\n #include <sys/ioctl.h>\n #include <termios.h>\n"},{"id":"155495","messageId":"7vbp5yo64p.fsf@alter.siamese.dyndns.org","threadId":"25686","inReplyTo":"AANLkTikXv8BhW-fz=pZ5iS6rHJB5mxMUhk0KFO3JSwWv@mail.gmail.com","subject":"Re: win32-daemon breakage when merged to pu","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-11-09T15:42:46Z","receivedAt":"2010-11-09T15:42:46Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Erik Faye-Lund <kusmabite@gmail.com> writes:\n\n> I supposed the correct conflict-resolution would be to keep Markus'\n> new conditional inclusion, but move it to the location I changed it\n> to. With this patch on top it compiles just fine for me:\n\nThanks.\n"}]}