summaryrefslogtreecommitdiff
path: root/source3/lib/system.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-02-08 14:43:07 -0800
committerJeremy Allison <jra@samba.org>2011-02-08 15:05:59 -0800
commit1911d483e552a6ec73b2c107b968268e7e9111e5 (patch)
tree622f4d840ff9f054814cfab0460a50671b44d58b /source3/lib/system.c
parent5a0ee95b95d22f8eee7cc86d350fb0e60ab54b69 (diff)
downloadsamba-1911d483e552a6ec73b2c107b968268e7e9111e5.tar.gz
samba-1911d483e552a6ec73b2c107b968268e7e9111e5.tar.bz2
samba-1911d483e552a6ec73b2c107b968268e7e9111e5.zip
Add fdopendir().
Diffstat (limited to 'source3/lib/system.c')
-rw-r--r--source3/lib/system.c16
1 files changed, 16 insertions, 0 deletions
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
@@ -867,6 +867,22 @@ SMB_STRUCT_DIR *sys_opendir(const char *name)
}
/*******************************************************************
+ 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.
********************************************************************/