summaryrefslogtreecommitdiffstats
path: root/source/lib/system.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-12-15 21:16:20 +0000
committerJeremy Allison <jra@samba.org>1998-12-15 21:16:20 +0000
commit49d87cb33c07f18fb9fdd0db203d20fc7bee0489 (patch)
treeed701dd15ad7718aa310a16d0b9d4899790b2d9c /source/lib/system.c
parent9e004fef6ba2b1d0913ab98bf420f2be3ac55d84 (diff)
downloadsamba-49d87cb33c07f18fb9fdd0db203d20fc7bee0489.tar.gz
samba-49d87cb33c07f18fb9fdd0db203d20fc7bee0489.tar.xz
samba-49d87cb33c07f18fb9fdd0db203d20fc7bee0489.zip
acconfig.h configure configure.in include/config.h.in
lib/system.c script/mkproto.awk include/includes.h: Added sys_readdir that wraps readdir64. lib/util.c: Changed gethostname() to use sizeof(hostname) as the second arg for buffer size. Jeremy.
Diffstat (limited to 'source/lib/system.c')
-rw-r--r--source/lib/system.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/lib/system.c b/source/lib/system.c
index 3a91108dff4..c1e4aa5122c 100644
--- a/source/lib/system.c
+++ b/source/lib/system.c
@@ -295,6 +295,19 @@ void *sys_mmap(void *addr, size_t len, int prot, int flags, int fd, SMB_OFF_T of
#endif /* HAVE_SHARED_MMAP */
/*******************************************************************
+ A readdir wrapper that will deal with 64 bit filesizes.
+********************************************************************/
+
+SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp)
+{
+#if defined(HAVE_READDIR64)
+ return readdir64(dirp);
+#else
+ return readdir(dirp);
+#endif
+}
+
+/*******************************************************************
The wait() calls vary between systems
********************************************************************/