From 62f2ac904fb1c564d9a359b01f8c88d83f3b76a9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 5 Oct 1998 09:23:46 +0000 Subject: this gets it compiling under IRIX 6.4. Doesn't work yet though. (This used to be commit 0c8288a72c6d6f2774dd57a7107ad68c98e0d24a) --- source3/smbwrapper/realcalls.h | 10 +++++++++- source3/smbwrapper/wrapped.c | 6 ++++-- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'source3') 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)) diff --git a/source3/smbwrapper/wrapped.c b/source3/smbwrapper/wrapped.c index 6bfb465828..e87bd5f1f2 100644 --- a/source3/smbwrapper/wrapped.c +++ b/source3/smbwrapper/wrapped.c @@ -76,17 +76,19 @@ } #endif +#ifndef NO_OPEN64_ALIAS #ifdef HAVE__OPEN64 int _open64(const char *name, int flags, mode_t mode) { return open64(name, flags, mode); } -#elif HAVE___OPEN +#elif HAVE___OPEN64 int __open64(const char *name, int flags, mode_t mode) { return open64(name, flags, mode); } #endif +#endif #ifdef HAVE_PREAD ssize_t pread(int fd, void *buf, size_t size, off_t ofs) @@ -626,7 +628,7 @@ #endif #ifdef HAVE_UTIMES - int utimes(const char *name,struct timeval tvp[2]) + int utimes(const char *name,const struct timeval tvp[2]) { if (smbw_path(name)) { return smbw_utimes(name, tvp); -- cgit