summaryrefslogtreecommitdiffstats
path: root/source3/smbwrapper/realcalls.h
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbwrapper/realcalls.h')
-rw-r--r--source3/smbwrapper/realcalls.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/smbwrapper/realcalls.h b/source3/smbwrapper/realcalls.h
index cf23aec5b2..0c9bcd69bf 100644
--- a/source3/smbwrapper/realcalls.h
+++ b/source3/smbwrapper/realcalls.h
@@ -31,8 +31,16 @@
#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 SYS_open64
+#define real_open64(fn,flags,mode) (syscall(SYS_open64, (fn), (flags), (mode)))
+#elif HAVE__OPEN64
+#define real_open64(fn,flags,mode) (_open64(fn,flags,mode))
+#define NO_OPEN64_ALIAS
+#elif HAVE___OPEN64
+#define real_open64(fn,flags,mode) (__open64(fn,flags,mode))
+#define NO_OPEN64_ALIAS
+#endif
#ifdef HAVE__OPENDIR
#define real_opendir(fn) (_opendir(fn))