summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ee96d11)
raw | patch | inline | side by side (parent: ee96d11)
author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | |
Sat, 3 Mar 2007 18:28:52 +0000 (18:28 +0000) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 4 Mar 2007 02:55:04 +0000 (18:55 -0800) |
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>
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>
git-compat-util.h | patch | blob | history |
diff --git a/git-compat-util.h b/git-compat-util.h
index 9863cf671f7522f73ea5a88af0d1234488c73396..309240bbce15f732597198818a3c67c3e6274fe8 100644 (file)
--- a/git-compat-util.h
+++ b/git-compat-util.h
#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>