summaryrefslogtreecommitdiff
path: root/source3/lib/system.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/system.c')
-rw-r--r--source3/lib/system.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 7734328795..eaaa76743a 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -148,6 +148,21 @@ ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *f
}
/*******************************************************************
+A fcntl wrapper that will deal with EINTR.
+********************************************************************/
+
+int sys_fcntl(int fd, int cmd, void *arg)
+{
+ int ret;
+
+ do {
+ errno = 0;
+ ret = fcntl(fd, cmd, arg);
+ } while (ret == -1 && errno == EINTR);
+ return ret;
+}
+
+/*******************************************************************
A stat() wrapper that will deal with 64 bit filesizes.
********************************************************************/