summaryrefslogtreecommitdiff
path: root/lib/mgetgroups.c
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-07-04 17:13:50 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-07-04 17:13:50 +0300
commit71cd8e3a743046573744123777061b64881bf372 (patch)
tree82522befe647f4fff186a5630cad0cad33f8ef53 /lib/mgetgroups.c
parentc18578632fd3c9e513e613a86ba2b7c4ebee6c45 (diff)
downloadcoreutils-upstream.tar.gz
Imported Upstream version 8.24upstream/8.24upstream
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)
{