]> git.sesse.net Git - vlc/blobdiff - modules/access/directory.c
fdopendir does not imply openat (fix #3505)
[vlc] / modules / access / directory.c
index 05155ff4a552e0f1a1c7a803d3ba4e4abca87add..f2b8aec07913e54c84e2e9ad9c31e0273c07d651 100644 (file)
@@ -76,7 +76,7 @@ struct directory_t
 #ifndef WIN32
     struct stat  st;
 #endif
-#ifndef HAVE_FDOPENDIR
+#ifndef HAVE_OPENAT
     char         *path;
 #endif
 };
@@ -175,7 +175,7 @@ void DirClose( vlc_object_t * p_this )
         p_sys->current = current->parent;
         closedir (current->handle);
         free (current->uri);
-#ifndef HAVE_FDOPENDIR
+#ifndef HAVE_OPENAT
         free (current->path);
 #endif
         free (current);
@@ -237,7 +237,7 @@ block_t *DirBlock (access_t *p_access)
         }
         current->parent = NULL;
         current->handle = p_sys->handle;
-#ifndef HAVE_FDOPENDIR
+#ifndef HAVE_OPENAT
         current->path = strdup (p_access->psz_path);
 #endif
         current->uri = p_sys->uri;
@@ -260,7 +260,7 @@ block_t *DirBlock (access_t *p_access)
         closedir (current->handle);
         p_sys->current = current->parent;
         free (current->uri);
-#ifndef HAVE_FDOPENDIR
+#ifndef HAVE_OPENAT
         free (current->path);
 #endif
         free (current);
@@ -315,7 +315,7 @@ block_t *DirBlock (access_t *p_access)
         }
 
         DIR *handle;
-#ifdef HAVE_FDOPENDIR
+#ifdef HAVE_OPENAT
         int fd = vlc_openat (dirfd (current->handle), entry, O_RDONLY);
         if (fd != -1)
         {