summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/smbwrapper/realcalls.h7
-rw-r--r--source3/smbwrapper/wrapped.c12
2 files changed, 13 insertions, 6 deletions
diff --git a/source3/smbwrapper/realcalls.h b/source3/smbwrapper/realcalls.h
index 9a13ab9300..1d65499ae3 100644
--- a/source3/smbwrapper/realcalls.h
+++ b/source3/smbwrapper/realcalls.h
@@ -31,6 +31,7 @@
#define real_link(fn1, fn2) (syscall(SYS_link, (fn1), (fn2)))
#define real_open(fn,flags,mode) (syscall(SYS_open, (fn), (flags), (mode)))
+#define real_open64(fn,flags,mode) (syscall(SYS_open64, (fn), (flags), (mode)))
#ifdef HAVE__OPENDIR
@@ -177,12 +178,6 @@
#endif
-#ifdef HAVE__OPEN64
-#define real_open64(fn,fl,m) (_open64(fn,fl,m))
-#elif HAVE___OPEN64
-#define real_open64(fn,fl,m) (__open64(fn,fl,m))
-#endif
-
#ifdef HAVE__PREAD
#define real_pread(fd,buf,size,ofs) (_pread(fd,buf,size,ofs))
#elif HAVE___PREAD
diff --git a/source3/smbwrapper/wrapped.c b/source3/smbwrapper/wrapped.c
index d0a3842485..81f8162290 100644
--- a/source3/smbwrapper/wrapped.c
+++ b/source3/smbwrapper/wrapped.c
@@ -55,6 +55,18 @@
}
#endif
+#ifdef HAVE__OPEN64
+ int _open64(const char *name, int flags, mode_t mode)
+{
+ return open64(name, flags, mode);
+}
+#elif HAVE___OPEN
+ int __open64(const char *name, int flags, mode_t mode)
+{
+ return open64(name, flags, mode);
+}
+#endif
+
#ifdef HAVE_PREAD
ssize_t pread(int fd, void *buf, size_t size, off_t ofs)
{