summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1994-09-18 00:28:34 +0000
committerJim Meyering <jim@meyering.net>1994-09-18 00:28:34 +0000
commitfe106be46b4fb8e5a777b4de84e85530430ba40c (patch)
tree70fd995a98c1d677748ecfc5b400ad06b04e6cae
parent73b9e4b762d89e5774735f2f8fba5cdc4155b7bb (diff)
downloadcoreutils-fe106be46b4fb8e5a777b4de84e85530430ba40c.tar.xz
.
-rw-r--r--src/su.c5
-rw-r--r--src/who.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/su.c b/src/su.c
index 6bee0cb59..303a3c67d 100644
--- a/src/su.c
+++ b/src/su.c
@@ -118,8 +118,11 @@ uid_t getuid ();
#endif
#endif /* not _POSIX_VERSION */
-#ifdef _POSIX_SOURCE
+#ifndef HAVE_ENDGRENT
#define endgrent()
+#endif
+
+#ifndef HAVE_ENDPWENT
#define endpwent()
#endif
diff --git a/src/who.c b/src/who.c
index 5ded20f75..c2f6e20ab 100644
--- a/src/who.c
+++ b/src/who.c
@@ -56,7 +56,7 @@
#include <time.h>
#include <getopt.h>
-#ifndef _POSIX_SOURCE
+#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif