summary refs log tree commit diff
path: root/dirent/scandirat64.c
diff options
context:
space:
mode:
Diffstat (limited to 'dirent/scandirat64.c')
-rw-r--r--dirent/scandirat64.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/dirent/scandirat64.c b/dirent/scandirat64.c
index 520ae7cad7..7e5e209cdf 100644
--- a/dirent/scandirat64.c
+++ b/dirent/scandirat64.c
@@ -15,15 +15,18 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define scandirat __no_scandirat_decl
 #include <dirent.h>
-
-/* scandirat.c defines scandirat64 as an alias if _DIRENT_MATCHES_DIRENT64.  */
-#if !_DIRENT_MATCHES_DIRENT64
-
-# define SCANDIRAT      scandirat64
-# define SCANDIR_TAIL   __scandir64_tail
-# define DIRENT_TYPE    struct dirent64
-
-# include <scandirat.c>
-
+#undef scandirat
+
+int
+scandirat64 (int dfd, const char *dir, struct dirent64 ***namelist,
+	     int (*select) (const struct dirent64 *),
+	     int (*cmp) (const struct dirent64 **, const struct dirent64 **))
+{
+  return __scandir64_tail (__opendirat (dfd, dir), namelist, select, cmp);
+}
+
+#if _DIRENT_MATCHES_DIRENT64
+weak_alias (scandirat64, scandirat)
 #endif