aboutsummaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2007-03-03 18:28:52 +0000
committerJunio C Hamano <junkio@cox.net>2007-03-03 18:55:04 -0800
commit41b200179dfac7bf4c3b98270951937b537e2b24 (patch)
treedd3b103f994e2a2c05cd3c1364c88031f20b53f4 /git-compat-util.h
parentee96d11bebcbb4826f9b59b5dca64e2b8a204bc0 (diff)
downloadgit-41b200179dfac7bf4c3b98270951937b537e2b24.tar.gz
git-41b200179dfac7bf4c3b98270951937b537e2b24.tar.xz
Fix an "implicit function definition" warning.
The function at issue being initgroups() from the <grp.h> header file. On Cygwin, setting _XOPEN_SOURCE suppresses the definition of initgroups(), which causes the warning while compiling daemon.c. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 9863cf671..309240bbc 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -47,9 +47,15 @@
#include <netdb.h>
#include <pwd.h>
#include <inttypes.h>
+#if defined(__CYGWIN__)
+#undef _XOPEN_SOURCE
+#include <grp.h>
+#define _XOPEN_SOURCE 600
+#else
#undef _ALL_SOURCE /* AIX 5.3L defines a struct list with _ALL_SOURCE. */
#include <grp.h>
#define _ALL_SOURCE 1
+#endif
#ifndef NO_ICONV
#include <iconv.h>