struct dirent *readdir (DIR *dirp)
{
+ static int count = 1;
+
+#ifndef __LP64__
+ if (count == 1)
+ fclose (fopen ("32bit", "w"));
+ errno = ENOSYS;
+ return NULL;
+#endif
+
static struct dirent *(*real_readdir)(DIR *dirp);
if (! real_readdir && ! (real_readdir = dlsym (RTLD_NEXT, "readdir")))
{
}
/* Flag that LD_PRELOAD and above functions work. */
- static int count = 1;
if (count == 1)
fclose (fopen ("preloaded", "w"));
rm -f preloaded
(export LD_PRELOAD=$LD_PRELOAD:./k.so
returns_ 1 rm -Rf dir 2>>errt) || fail=1
- if ! test -f preloaded; then
- cat err
+ if test -f 32bit; then
+ skip_ 'This test only supports 64 bit systems'
+ elif ! test -f preloaded; then
+ cat errt
skip_ "internal test failure: maybe LD_PRELOAD doesn't work?"
fi
done