]> git.sesse.net Git - vlc/commitdiff
Remove dirfd() hacks
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 3 Jan 2012 16:35:02 +0000 (18:35 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 3 Jan 2012 16:35:02 +0000 (18:35 +0200)
compat/dirfd.c
include/vlc_fixups.h

index 5c9ddb6872ca76c5649f98b724d6725f3188212f..d700b55d20be1a770305983170c95067d64e3a22 100644 (file)
 #include <dirent.h>
 #include <errno.h>
 
-int dirfd (DIR *dir)
+int (dirfd) (DIR *dir)
 {
-#if defined (__sun__) || defined (__FreeBSD__)
-    return dir->dd_fd;
-#elif defined (__APPLE__)
-    return dir->__dd_fd;
+#ifdef dirfd
+    return dirfd (dir);
 #else
     (void) dir;
 # ifdef ENOTSUP
index 092c830dba701e978df13218949475667e755847..02f85e34dee40df0a6802ccdff5b82f4fa2b2a8d 100644 (file)
@@ -183,10 +183,7 @@ int fsync (int fd);
 
 /* dirent.h */
 #ifndef HAVE_DIRFD
-#if defined(__APPLE__) || defined(__OS2__) || defined(__FreeBSD__)
-#undef dirfd
-#endif
-int dirfd (DIR *);
+int (dirfd) (DIR *);
 #endif
 
 #ifndef HAVE_FDOPENDIR