From: RĂ©mi Denis-Courmont Date: Tue, 3 Jan 2012 16:35:02 +0000 (+0200) Subject: Remove dirfd() hacks X-Git-Tag: 2.1.0-git~6468 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;ds=sidebyside;h=38227c2441ad80bbf000f3a5fda40f5ca1dd6e3d;p=vlc Remove dirfd() hacks --- 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