about summary refs log tree commit diff
path: root/dirent/scandir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dirent/scandir.c')
-rw-r--r--dirent/scandir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dirent/scandir.c b/dirent/scandir.c
index cffc8a98cb..ed9071df6e 100644
--- a/dirent/scandir.c
+++ b/dirent/scandir.c
@@ -28,7 +28,7 @@ scandir (dir, namelist, select, cmp)
      int (*select) __P ((const struct dirent *));
      int (*cmp) __P ((const void *, const void *));
 {
-  DIR *dp = opendir (dir);
+  DIR *dp = __opendir (dir);
   struct dirent **v = NULL;
   size_t vsize = 0, i;
   struct dirent *d;
@@ -74,7 +74,7 @@ scandir (dir, namelist, select, cmp)
   if (errno != 0)
     {
       save = errno;
-      (void) closedir (dp);
+      (void) __closedir (dp);
       while (i > 0)
 	free (v[--i]);
       free (v);
@@ -82,7 +82,7 @@ scandir (dir, namelist, select, cmp)
       return -1;
     }
 
-  (void) closedir (dp);
+  (void) __closedir (dp);
   __set_errno (save);
 
   /* Sort the list if we have a comparison function to sort with.  */