From abff441e445431970d1e25fa79e10276e576d9e3 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 10 Apr 2013 16:30:10 -0700 Subject: [PATCH] Remove dependency on detection of HAVE_DIRFD for use of fdopendir(). Signed-off-by: Jeremy Allison Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Fri Apr 12 16:21:10 CEST 2013 on sn-devel-104 (cherry picked from commit 7a4dd845958f1411daa8031ca242987001ab2f26) --- source3/lib/system.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source3/lib/system.c b/source3/lib/system.c index 7c0bb3fe5ae..1ca2f5e82ce 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -882,16 +882,14 @@ SMB_STRUCT_DIR *sys_opendir(const char *name) } /******************************************************************* - An fdopendir wrapper that will deal with 64 bit filesizes. - Ugly hack - we need dirfd for this to work correctly in the - calling code.. JRA. + An fdopendir wrapper. ********************************************************************/ SMB_STRUCT_DIR *sys_fdopendir(int fd) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_FDOPENDIR64) && defined(HAVE_DIRFD) +#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_FDOPENDIR64) return fdopendir64(fd); -#elif defined(HAVE_FDOPENDIR) && defined(HAVE_DIRFD) +#elif defined(HAVE_FDOPENDIR) return fdopendir(fd); #else errno = ENOSYS; -- 2.34.1