]> git.sesse.net Git - vlc/commitdiff
fix missing dirfd references for FreeBSD
authorGeraud CONTINSOUZAS <geraud@gcu.info>
Mon, 2 Jan 2012 22:50:16 +0000 (09:50 +1100)
committerRafaël Carré <funman@videolan.org>
Tue, 3 Jan 2012 00:10:30 +0000 (19:10 -0500)
Signed-off-by: Rafaël Carré <funman@videolan.org>
compat/dirfd.c
include/vlc_fixups.h

index 263911f61549cb87c6891b1213ade17cb3fcf477..5c9ddb6872ca76c5649f98b724d6725f3188212f 100644 (file)
@@ -27,7 +27,7 @@
 
 int dirfd (DIR *dir)
 {
-#if defined (__sun__)
+#if defined (__sun__) || defined (__FreeBSD__)
     return dir->dd_fd;
 #elif defined (__APPLE__)
     return dir->__dd_fd;
index 4334004a36cba530fc482060f7632e0ec86ab402..092c830dba701e978df13218949475667e755847 100644 (file)
@@ -183,7 +183,7 @@ int fsync (int fd);
 
 /* dirent.h */
 #ifndef HAVE_DIRFD
-#if defined(__APPLE__) || defined(__OS2__)
+#if defined(__APPLE__) || defined(__OS2__) || defined(__FreeBSD__)
 #undef dirfd
 #endif
 int dirfd (DIR *);