]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - dirent/scandirat64.c
hurd: Fix build
[thirdparty/glibc.git] / dirent / scandirat64.c
index 736cf3f5375ef3df6cf633d35a2fbf602d31ca49..eb8184040262e60a274360b534f61f40bbaa294f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2014 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
    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.  */
-#ifndef _DIRENT_MATCHES_DIRENT64
-
-#define SCANDIRAT scandirat64
-#define READDIR __readdir64
-#define DIRENT_TYPE struct dirent64
-#define SKIP_SCANDIR_CANCEL 1
-
-#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