From cbb4eb9d35a809c328dc0a5d6651ec504ce4435c Mon Sep 17 00:00:00 2001 From: Jon Ringle Date: Wed, 3 Mar 2010 19:21:24 -0500 Subject: [PATCH 2/2] Replace index() with strchr() uclibc does not have index(), but strchr() is equivalent to index() according to the index man page Signed-off-by: Jon Ringle --- src/mntent.c | 4 ++-- src/umount.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mntent.c b/src/mntent.c index 4d103c3..a4aeed0 100644 --- a/src/mntent.c +++ b/src/mntent.c @@ -8,7 +8,7 @@ #endif #include -#include /* for index */ +#include /* for strchr */ #include /* for isdigit */ #include "wd_mntent.h" #include "sundries.h" /* for xmalloc */ @@ -157,7 +157,7 @@ my_getmntent (mntFILE *mfp) { if (fgets (buf, sizeof(buf), mfp->mntent_fp) == NULL) return NULL; - s = index (buf, '\n'); + s = strchr (buf, '\n'); if (s == NULL) { /* extremely long line - assume file was corrupted */ mfp->mntent_errs = 1; diff --git a/src/umount.c b/src/umount.c index 8c9f08c..d5fbd0b 100644 --- a/src/umount.c +++ b/src/umount.c @@ -212,7 +212,7 @@ umount_one (const char *spec, const char *node, const char *type, if (res < 0) umnt_err2 = errno; /* Do not complain about remote NFS mount points */ - if (errno == ENOENT && index(spec, ':')) + if (errno == ENOENT && strchr(spec, ':')) umnt_err2 = 0; } } -- 1.7.0.rc2