From: Pádraig Brady
Date: Wed, 2 Jul 2014 09:16:04 +0000 (+0100)
Subject: tests: avoid errors on systems without getmntent
X-Git-Tag: v8.23~21
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39e2a4cff85cd37797c062a6196d4ce465398d00;p=thirdparty%2Fcoreutils.git
tests: avoid errors on systems without getmntent
* tests/df/no-mtab-status.sh: Skip if getmntent() not available.
* tests/df/skip-duplicates.sh: Likewise.
Fixes http://bugs.gnu.org/17863
---
diff --git a/tests/df/no-mtab-status.sh b/tests/df/no-mtab-status.sh
index f2fda5e656..9ea2036ddd 100755
--- a/tests/df/no-mtab-status.sh
+++ b/tests/df/no-mtab-status.sh
@@ -23,6 +23,12 @@ require_gcc_shared_
df || skip_ "df fails"
+grep '^#define HAVE_MNTENT_H 1' $CONFIG_HEADER > /dev/null \
+ || skip_ "no mntent.h available to confirm the interface"
+
+grep '^#define HAVE_GETMNTENT 1' $CONFIG_HEADER > /dev/null \
+ || skip_ "getmntent is not used on this system"
+
# Simulate "mtab" failure.
cat > k.c <<'EOF' || framework_failure_
#include