summaryrefslogtreecommitdiff
path: root/test/misc
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-03-29 04:50:56 -0500
committerWaldemar Brodkorb <wbx@openadk.org>2015-03-29 04:50:56 -0500
commitcd5f92704e1e17bbc0c15d197f3bc236c7dc9bf2 (patch)
tree1400302b543e4528aedea5d72731983559cfcf36 /test/misc
parentad2bffbf1926051ef333f9899344f6bddf2c03cf (diff)
parent24946289317ea23bb0d1814cca0a499a905f7d6f (diff)
merge uClibc git master
Diffstat (limited to 'test/misc')
-rw-r--r--test/misc/Makefile.in8
-rw-r--r--test/misc/tst-scandir.c2
-rw-r--r--test/misc/tst-utmp.c15
-rw-r--r--test/misc/tst-utmpx.c2
4 files changed, 26 insertions, 1 deletions
diff --git a/test/misc/Makefile.in b/test/misc/Makefile.in
index 345889e0f..d78b276c2 100644
--- a/test/misc/Makefile.in
+++ b/test/misc/Makefile.in
@@ -21,6 +21,14 @@ ifeq ($(UCLIBC_HAS_GLOB),)
TESTS_DISABLED += bug-glob2
endif
+ifeq ($(UCLIBC_HAS_UTMPX),)
+TESTS_DISABLED += tst-utmpx
+endif
+
+ifeq ($(UCLIBC_HAS_UTMP),)
+TESTS_DISABLED += tst-utmp
+endif
+
DODIFF_dirent := 1
DODIFF_dirent64 := 1
DODIFF_tst-statfs := 1
diff --git a/test/misc/tst-scandir.c b/test/misc/tst-scandir.c
index df62a40d4..e1c72e3c9 100644
--- a/test/misc/tst-scandir.c
+++ b/test/misc/tst-scandir.c
@@ -3,7 +3,7 @@
#include <stdio.h> /* perror() */
#include <stdlib.h>
-int skip_all(const struct dirent *dirbuf)
+static int skip_all(const struct dirent *dirbuf)
{
errno = EBADF;
return 0;
diff --git a/test/misc/tst-utmp.c b/test/misc/tst-utmp.c
index 08a6f8ea3..1b0333a32 100644
--- a/test/misc/tst-utmp.c
+++ b/test/misc/tst-utmp.c
@@ -37,6 +37,21 @@
# include <utmp.h>
#endif
+#ifndef _HAVE_UT_TYPE
+# define _HAVE_UT_TYPE 0
+#endif
+#ifndef _HAVE_UT_PID
+# define _HAVE_UT_PID 0
+#endif
+#ifndef _HAVE_UT_ID
+# define _HAVE_UT_ID 0
+#endif
+#ifndef _HAVE_UT_TV
+# define _HAVE_UT_TV 0
+#endif
+#ifndef _HAVE_UT_HOST
+# define _HAVE_UT_HOST 0
+#endif
#if _HAVE_UT_TYPE || defined UTMPX
diff --git a/test/misc/tst-utmpx.c b/test/misc/tst-utmpx.c
new file mode 100644
index 000000000..edb5551d7
--- /dev/null
+++ b/test/misc/tst-utmpx.c
@@ -0,0 +1,2 @@
+#define UTMPX
+#include "tst-utmp.c"