summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/rm/rm-readdir-fail.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/rm/rm-readdir-fail.sh b/tests/rm/rm-readdir-fail.sh
index 15ef1d6c4..d9d8efdb4 100755
--- a/tests/rm/rm-readdir-fail.sh
+++ b/tests/rm/rm-readdir-fail.sh
@@ -26,6 +26,12 @@ mkdir -p dir/notempty || framework_failure_
# Simulate "readdir" failure.
cat > k.c <<\EOF || framework_failure_
#define _GNU_SOURCE
+
+/* Setup so we don't have to worry about readdir64. */
+#ifndef __LP64__
+# define _FILE_OFFSET_BITS 64
+#endif
+
#include <dlfcn.h>
#include <dirent.h>
#include <errno.h>
@@ -72,11 +78,6 @@ struct dirent *readdir (DIR *dirp)
errno = ENOENT;
return NULL;
}
-
-struct dirent64 *readdir64 (DIR *dirp)
-{
- return (struct dirent64 *) readdir (dirp);
-}
EOF
# Then compile/link it: