summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad Smith <brad@comstyle.com>2011-10-12 04:23:58 -0400
committerKarolin Seeger <kseeger@samba.org>2011-10-20 20:00:48 +0200
commit0f6b4b68db334028a5fa60c8615879a033286a4b (patch)
tree7620710eab7b41f76f2807d6ec7cf5aa765fe833
parentbc3af75ec9841753b5bfbcd04d9a412f7ee5c4b5 (diff)
downloadsamba-0f6b4b68db334028a5fa60c8615879a033286a4b.tar.gz
samba-0f6b4b68db334028a5fa60c8615879a033286a4b.tar.xz
samba-0f6b4b68db334028a5fa60c8615879a033286a4b.zip
Fix sys_fseek wrapper
Signed-off-by: Günther Deschner <gd@samba.org> Fix bug #8525 (Bug with sys_fseek() wrapper on *BSD / OS X).
-rw-r--r--source3/configure.in2
-rw-r--r--source3/lib/system.c2
-rw-r--r--source3/wscript4
3 files changed, 5 insertions, 3 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 9b49c96c601..11682b7a663 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1083,7 +1083,7 @@ AC_CHECK_FUNCS(getgrset)
AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups sysconf stat64 fstat64)
AC_CHECK_FUNCS(lstat64 fopen64 atexit grantpt lseek64 ftruncate64 posix_fallocate posix_fallocate64)
AC_CHECK_FUNCS(fallocate fallocate64)
-AC_CHECK_FUNCS(fseek64 fseeko64 ftell64 ftello64 setluid getpwanam)
+AC_CHECK_FUNCS(fseeko fseek64 fseeko64 ftell64 ftello64 setluid getpwanam)
AC_CHECK_FUNCS(opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64)
AC_CHECK_FUNCS(fdopendir fdopendir64)
AC_CHECK_FUNCS(getpwent_r)
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 74a8971c538..7c0bb3fe5ae 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -769,6 +769,8 @@ int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence)
return fseek64(fp, offset, whence);
#elif defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(LARGE_SMB_OFF_T) && defined(HAVE_FSEEKO64)
return fseeko64(fp, offset, whence);
+#elif defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(LARGE_SMB_OFF_T) && defined(HAVE_FSEEKO)
+ return fseeko(fp, offset, whence);
#else
return fseek(fp, offset, whence);
#endif
diff --git a/source3/wscript b/source3/wscript
index a1043c811a3..f8b0f7b8d54 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -124,7 +124,7 @@ def configure(conf):
conf.CHECK_FUNCS('initgroups select poll rdchk getgrnam getgrent pathconf')
conf.CHECK_FUNCS('setpriv setgidx setuidx setgroups sysconf stat64 fstat64')
conf.CHECK_FUNCS('lstat64 fopen64 atexit grantpt lseek64 ftruncate64 fallocate fallocate64 posix_fallocate posix_fallocate64')
- conf.CHECK_FUNCS('fseek64 fseeko64 ftell64 ftello64 setluid')
+ conf.CHECK_FUNCS('fseeko fseek64 fseeko64 ftell64 ftello64 setluid')
conf.CHECK_FUNCS('getpwnam', headers='sys/types.h pwd.h')
conf.CHECK_FUNCS('opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64')
conf.CHECK_FUNCS('fdopendir fdopendir64')
@@ -276,7 +276,7 @@ extattr_get_link extattr_list_fd extattr_list_file extattr_list_link
extattr_set_fd extattr_set_file extattr_set_link _facl __facl _fchdir
__fchdir fchmod fchown _fcntl __fcntl fcvt fcvtl fdatasync
fdelproplist fgetea fgetproplist fgetxattr flistea flistxattr fopen64
-_fork __fork fremoveea fremovexattr fseek64 fseeko64 fsetea
+_fork __fork fremoveea fremovexattr fseeko fseek64 fseeko64 fsetea
fsetproplist fsetxattr _fstat __fstat fstat64 _fstat64 __fstat64 fsync
ftell64 ftello64 ftruncate64 futimens futimes __fxstat getauthuid
getcwd _getcwd __getcwd getdents __getdents getdents64 getdirentries