summaryrefslogtreecommitdiff
path: root/lib/userspec.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1993-04-05 00:53:40 +0000
committerJim Meyering <jim@meyering.net>1993-04-05 00:53:40 +0000
commit7f7cd1d6781afff7be0265b18a67836293d57e6b (patch)
treef5edd0756b1467678712a88aea032c340566fa36 /lib/userspec.c
parentfb81d346de6f2eb3a165c883ede80e5cddc23d23 (diff)
downloadcoreutils-7f7cd1d6781afff7be0265b18a67836293d57e6b.tar.xz
* system.h [rindex, incl, bcopy, bzero]: Ditto.
* userspec.c [index]: Ditto.
Diffstat (limited to 'lib/userspec.c')
-rw-r--r--lib/userspec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/userspec.c b/lib/userspec.c
index 60c6ecc1a..44d7d9174 100644
--- a/lib/userspec.c
+++ b/lib/userspec.c
@@ -22,9 +22,11 @@
#include <pwd.h>
#include <grp.h>
-#if defined(USG) || defined(STDC_HEADERS)
+#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
#include <string.h>
+#ifndef index
#define index strchr
+#endif
#else
#include <strings.h>
#endif