{"thread":{"id":"7067","subject":"[PATCH 4/6] Fix an \"implicit function definition\" warning.","startedAt":"2007-03-03T18:28:52Z","lastAt":"2007-03-03T18:28:52Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"36190","messageId":"45E9BE64.5030904@ramsay1.demon.co.uk","threadId":"7067","inReplyTo":null,"subject":"[PATCH 4/6] Fix an \"implicit function definition\" warning.","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2007-03-03T18:28:52Z","receivedAt":"2007-03-03T18:28:52Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nThe function at issue being initgroups() from the <grp.h> header\nfile. On Cygwin, setting _XOPEN_SOURCE suppresses the definition\nof initgroups(), which causes the warning while compiling daemon.c.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n  git-compat-util.h |    6 ++++++\n  1 files changed, 6 insertions(+), 0 deletions(-)\n\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex c1bcb00..e54604e 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -47,9 +47,15 @@\n  #include <netdb.h>\n  #include <pwd.h>\n  #include <inttypes.h>\n+#if defined(__CYGWIN__)\n+#undef _XOPEN_SOURCE\n+#include <grp.h>\n+#define _XOPEN_SOURCE 600\n+#else\n  #undef _ALL_SOURCE /* AIX 5.3L defines a struct list with _ALL_SOURCE. */\n  #include <grp.h>\n  #define _ALL_SOURCE 1\n+#endif\n\n  #ifndef NO_ICONV\n  #include <iconv.h>\n-- \n1.5.0\n"}]}