summaryrefslogtreecommitdiff
path: root/lib/mgetgroups.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mgetgroups.c')
-rw-r--r--lib/mgetgroups.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/mgetgroups.c b/lib/mgetgroups.c
index 9d302e74..6acb0191 100644
--- a/lib/mgetgroups.c
+++ b/lib/mgetgroups.c
@@ -1,6 +1,6 @@
/* mgetgroups.c -- return a list of the groups a user or current process is in
- Copyright (C) 2007-2014 Free Software Foundation, Inc.
+ Copyright (C) 2007-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -33,6 +33,12 @@
#include "getugroups.h"
#include "xalloc-oversized.h"
+/* Work around an incompatibility of OS X 10.11: getgrouplist
+ accepts int *, not gid_t *, and int and gid_t differ in sign. */
+#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__)
+# pragma GCC diagnostic ignored "-Wpointer-sign"
+#endif
+
static gid_t *
realloc_groupbuf (gid_t *g, size_t num)
{