[vlc-commits] fix missing dirfd references for FreeBSD
Geraud CONTINSOUZAS
git at videolan.org
Tue Jan 3 01:11:02 CET 2012
vlc | branch: master | Geraud CONTINSOUZAS <geraud at gcu.info> | Tue Jan 3 09:50:16 2012 +1100| [3ac083ca42c57ce6ee717a7ea81ff78f538469a9] | committer: Rafaël Carré
fix missing dirfd references for FreeBSD
Signed-off-by: Rafaël Carré <funman at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3ac083ca42c57ce6ee717a7ea81ff78f538469a9
---
compat/dirfd.c | 2 +-
include/vlc_fixups.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/compat/dirfd.c b/compat/dirfd.c
index 263911f..5c9ddb6 100644
--- a/compat/dirfd.c
+++ b/compat/dirfd.c
@@ -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;
diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index 4334004..092c830 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -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 *);
More information about the vlc-commits
mailing list