summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-07-05 08:25:58 +0000
committerJim Meyering <jim@meyering.net>1997-07-05 08:25:58 +0000
commitac0ee614d65c5dcd22ee911f969e1a5b7c50bad4 (patch)
treea91a0d50f6b8adec4315e4247a845e2409c8de7d /src
parent8e04be3e8db29a9b47ff3cf32a88b65f54db88f8 (diff)
downloadcoreutils-ac0ee614d65c5dcd22ee911f969e1a5b7c50bad4.tar.xz
Redefine/undef getusershell around inclusion of <unistd.h>
(via system.h) so Cray's int-returning prototype doesn't conflict with our char*-returning one.
Diffstat (limited to 'src')
-rw-r--r--src/su.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/su.c b/src/su.c
index 96b47552d..26c65fe7b 100644
--- a/src/su.c
+++ b/src/su.c
@@ -75,8 +75,16 @@
#include <sys/types.h>
#include <pwd.h>
#include <grp.h>
+
+/* Hide any system prototype for getusershell.
+ This is necessary because some Cray systems have a conflicting
+ prototype (returning `int') in <unistd.h>. */
+#define getusershell _getusershell_sys_proto_
+
#include "system.h"
+#undef getusershell
+
#if HAVE_SYSLOG_H && HAVE_SYSLOG
# include <syslog.h>
#else