summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-09-29 04:45:00 +0000
committerAndrew Tridgell <tridge@samba.org>2000-09-29 04:45:00 +0000
commit3edcc8c407b16d0698117ecc3fd858201c0a80ba (patch)
tree184eb80463b05f0a20fbf36cce9fdde5960a48c2 /source3/lib
parente600c12b6b2cd4e0ad0d145b0ad6d0b92113392f (diff)
downloadsamba-3edcc8c407b16d0698117ecc3fd858201c0a80ba.tar.gz
samba-3edcc8c407b16d0698117ecc3fd858201c0a80ba.tar.bz2
samba-3edcc8c407b16d0698117ecc3fd858201c0a80ba.zip
added a hack to get 64 bit locking working with the broken fcntl()
call in glibc 2.1.95. This hack only gets enabled if you define GLIBC_HACK_FCNTL64 (This used to be commit d8b9ec741cc57b5f3dd1b3ef782a7baed402beaa)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/system.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 479bce1965..e846e4755e 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -1013,3 +1013,17 @@ int sys_pclose(int fd)
return -1;
return wstatus;
}
+
+
+
+#if GLIBC_HACK_FCNTL64
+#include <asm/unistd.h>
+/* this is a gross hack. 64 bit locking is completely screwed up on
+ i386 Linux in glibc 2.1.95 (which ships with RedHat 7.0). This hack
+ "fixes" the problem with the current 2.4.0test kernels
+*/
+int fcntl64(int fd, int cmd, struct flock * lock)
+{
+ return syscall(__NR_fcntl64, fd, cmd, lock);
+}
+#endif /* HACK_FCNTL64 */