From 829e72fe9c97feaa3d45b768984a4c47b906a23a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 7 Oct 1998 09:57:22 +0000 Subject: yet another attempt at making this stuff portable. This time I use minimal includes in wrapped.c (This used to be commit fd6a59d8ca0932d61a60b74485841001d4f8fd44) --- source3/smbwrapper/realcalls.h | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'source3/smbwrapper/realcalls.h') diff --git a/source3/smbwrapper/realcalls.h b/source3/smbwrapper/realcalls.h index 20055a30ad..1a201895b6 100644 --- a/source3/smbwrapper/realcalls.h +++ b/source3/smbwrapper/realcalls.h @@ -19,6 +19,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#if HAVE_SYS_SYSCALL_H +#include +#elif HAVE_SYSCALL_H +#include +#endif + #ifdef IRIX /* amazingly, IRIX gets its own syscall numbers wrong! */ #ifdef SYSVoffset @@ -63,19 +69,19 @@ #endif #ifdef HAVE__OPENDIR -#define real_opendir(fn) ((DIR *)_opendir(fn)) +#define real_opendir(fn) (_opendir(fn)) #elif SYS_opendir -#define real_opendir(fn) ((DIR *)syscall(SYS_opendir,(fn))) +#define real_opendir(fn) (syscall(SYS_opendir,(fn))) #elif HAVE___OPENDIR -#define real_opendir(fn) ((DIR *)__opendir(fn)) +#define real_opendir(fn) (__opendir(fn)) #endif #ifdef HAVE__READDIR -#define real_readdir(d) ((struct dirent *)_readdir(d)) +#define real_readdir(d) (_readdir(d)) #elif HAVE___READDIR -#define real_readdir(d) ((struct dirent *)__readdir(d)) +#define real_readdir(d) (__readdir(d)) #elif SYS_readdir -#define real_readdir(d) ((struct dirent *)syscall(SYS_readdir,(d))) +#define real_readdir(d) (syscall(SYS_readdir,(d))) #endif #ifdef HAVE__CLOSEDIR @@ -192,9 +198,9 @@ #endif #ifdef HAVE__READDIR64 -#define real_readdir64(d) ((struct dirent64 *)_readdir64(d)) +#define real_readdir64(d) (_readdir64(d)) #elif HAVE___READDIR64 -#define real_readdir64(d) ((struct dirent64 *)__readdir64(d)) +#define real_readdir64(d) (__readdir64(d)) #endif #ifdef HAVE__LLSEEK -- cgit