From 38227c2441ad80bbf000f3a5fda40f5ca1dd6e3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= Date: Tue, 3 Jan 2012 18:35:02 +0200 Subject: [PATCH] Remove dirfd() hacks --- 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 5c9ddb6872..d700b55d20 100644 --- a/compat/dirfd.c +++ b/compat/dirfd.c @@ -25,12 +25,10 @@ #include #include -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 diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h index 092c830dba..02f85e34de 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__) || defined(__FreeBSD__) -#undef dirfd -#endif -int dirfd (DIR *); +int (dirfd) (DIR *); #endif #ifndef HAVE_FDOPENDIR