[vlc-commits] Remove dirfd() hacks
Rémi Denis-Courmont
git at videolan.org
Mon Jan 30 19:14:35 CET 2012
vlc/vlc-2.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jan 3 18:35:02 2012 +0200| [22220ec5039331067a13cd84deff2e85cd82a3ec] | committer: Rémi Denis-Courmont
Remove dirfd() hacks
(cherry picked from commit 38227c2441ad80bbf000f3a5fda40f5ca1dd6e3d)
Conflicts:
compat/dirfd.c
include/vlc_fixups.h
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=22220ec5039331067a13cd84deff2e85cd82a3ec
---
compat/dirfd.c | 8 +++-----
include/vlc_fixups.h | 5 +----
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/compat/dirfd.c b/compat/dirfd.c
index 263911f..d700b55 100644
--- a/compat/dirfd.c
+++ b/compat/dirfd.c
@@ -25,12 +25,10 @@
#include <dirent.h>
#include <errno.h>
-int dirfd (DIR *dir)
+int (dirfd) (DIR *dir)
{
-#if defined (__sun__)
- return dir->dd_fd;
-#elif defined (__APPLE__)
- return dir->__dd_fd;
+#ifdef dirfd
+ return dirfd (dir);
#else
(void) dir;
# ifdef ENOTSUP
diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index 15ebb4c..16172f5 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -183,10 +183,7 @@ int fsync (int fd);
/* dirent.h */
#ifndef HAVE_DIRFD
-#if defined(__APPLE__) || defined(__OS2__)
-#undef dirfd
-#endif
-int dirfd (DIR *);
+int (dirfd) (DIR *);
#endif
#ifndef HAVE_FDOPENDIR
More information about the vlc-commits
mailing list