@@ -393,13 +393,11 @@ test-xfail-XOPEN2K/syslog.h/linknamespace = yes
test-xfail-XOPEN2K/ucontext.h/linknamespace = yes
test-xfail-XOPEN2K/unistd.h/linknamespace = yes
test-xfail-XOPEN2K/wordexp.h/linknamespace = yes
-test-xfail-POSIX2008/dirent.h/linknamespace = yes
test-xfail-POSIX2008/grp.h/linknamespace = yes
test-xfail-POSIX2008/netdb.h/linknamespace = yes
test-xfail-POSIX2008/regex.h/linknamespace = yes
test-xfail-POSIX2008/semaphore.h/linknamespace = yes
test-xfail-POSIX2008/unistd.h/linknamespace = yes
-test-xfail-XOPEN2K8/dirent.h/linknamespace = yes
test-xfail-XOPEN2K8/fmtmsg.h/linknamespace = yes
test-xfail-XOPEN2K8/grp.h/linknamespace = yes
test-xfail-XOPEN2K8/netdb.h/linknamespace = yes
@@ -28,7 +28,7 @@
#ifndef SCANDIR
# define SCANDIR scandir
-# define SCANDIRAT scandirat
+# define SCANDIRAT __scandirat
# define DIRENT_TYPE struct dirent
#endif
@@ -30,9 +30,10 @@
#include <bits/libc-lock.h>
#ifndef SCANDIRAT
-# define SCANDIRAT scandirat
+# define SCANDIRAT __scandirat
# define READDIR __readdir
# define DIRENT_TYPE struct dirent
+# define SCANDIRAT_WEAK_ALIAS
#endif
#ifndef SKIP_SCANDIR_CANCEL
@@ -148,6 +149,9 @@ SCANDIRAT (dfd, dir, namelist, select, cmp)
return c.cnt;
}
libc_hidden_def (SCANDIRAT)
+#ifdef SCANDIRAT_WEAK_ALIAS
+weak_alias (__scandirat, scandirat)
+#endif
#ifdef _DIRENT_MATCHES_DIRENT64
weak_alias (scandirat, scandirat64)
@@ -50,7 +50,8 @@ extern void __scandir_cancel_handler (void *arg);
extern __typeof (rewinddir) __rewinddir;
libc_hidden_proto (__rewinddir)
-libc_hidden_proto (scandirat)
+extern __typeof (scandirat) __scandirat;
+libc_hidden_proto (__scandirat)
libc_hidden_proto (scandirat64)
# endif