Revert "s3-lib Remove unused sys_fcntl_long()"
authorStefan Metzmacher <metze@samba.org>
Tue, 19 Jun 2012 09:34:04 +0000 (11:34 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 19 Jun 2012 15:04:29 +0000 (17:04 +0200)
This reverts commit 846a697e20478798288afb43cdb7a9f389a15c69.

This is still used in source3/smbd/oplock_irix.c

metze

source3/include/proto.h
source3/lib/system.c

index 463d9807b87adfb1ff9636bb696994fd2746e970..a258bf3ab497424ed970aa046fc84e4bfd301b14 100644 (file)
@@ -272,6 +272,7 @@ ssize_t sys_pwrite(int fd, const void *buf, size_t count, off_t off);
 ssize_t sys_send(int s, const void *msg, size_t len, int flags);
 ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen);
 int sys_fcntl_ptr(int fd, int cmd, void *arg);
+int sys_fcntl_long(int fd, int cmd, long arg);
 void update_stat_ex_mtime(struct stat_ex *dst, struct timespec write_ts);
 void update_stat_ex_create_time(struct stat_ex *dst, struct timespec create_time);
 int sys_stat(const char *fname, SMB_STRUCT_STAT *sbuf,
index 92596a8d72ec608b0a23453b9258eaba28faf2bd..3daa041a277e13d229d5d339e108ae109aa7dc93 100644 (file)
@@ -198,6 +198,20 @@ int sys_fcntl_ptr(int fd, int cmd, void *arg)
        return ret;
 }
 
+/*******************************************************************
+A fcntl wrapper that will deal with EINTR.
+********************************************************************/
+
+int sys_fcntl_long(int fd, int cmd, long arg)
+{
+       int ret;
+
+       do {
+               ret = fcntl(fd, cmd, arg);
+       } while (ret == -1 && errno == EINTR);
+       return ret;
+}
+
 /****************************************************************************
  Get/Set all the possible time fields from a stat struct as a timespec.
 ****************************************************************************/