From 1911d483e552a6ec73b2c107b968268e7e9111e5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 8 Feb 2011 14:43:07 -0800 Subject: Add fdopendir(). --- source3/lib/system.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'source3/lib') diff --git a/source3/lib/system.c b/source3/lib/system.c index 4cf6a299da..57434f2d42 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -866,6 +866,22 @@ SMB_STRUCT_DIR *sys_opendir(const char *name) #endif } +/******************************************************************* + An fdopendir wrapper that will deal with 64 bit filesizes. +********************************************************************/ + +SMB_STRUCT_DIR *sys_fdopendir(int fd) +{ +#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_FDOPENDIR64) + return fdopendir64(fd); +#elif defined(HAVE_FDOPENDIR) + return fdopendir(fd); +#else + errno = ENOSYS; + return NULL; +#endif +} + /******************************************************************* A readdir wrapper that will deal with 64 bit filesizes. ********************************************************************/ -- cgit