From: Wayne Davison Date: Fri, 13 Oct 2006 06:26:02 +0000 (+0000) Subject: Function fcntl() only takes 2 args when using F_GETFL. X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/ff530f04a002cad5a849e83d4e16cecc2b528358 Function fcntl() only takes 2 args when using F_GETFL. --- diff --git a/util.c b/util.c index dc37c04a..6526a3d9 100644 --- a/util.c +++ b/util.c @@ -45,7 +45,7 @@ void set_nonblocking(int fd) { int val; - if ((val = fcntl(fd, F_GETFL, 0)) == -1) + if ((val = fcntl(fd, F_GETFL)) == -1) return; if (!(val & NONBLOCK_FLAG)) { val |= NONBLOCK_FLAG; @@ -58,7 +58,7 @@ void set_blocking(int fd) { int val; - if ((val = fcntl(fd, F_GETFL, 0)) == -1) + if ((val = fcntl(fd, F_GETFL)) == -1) return; if (val & NONBLOCK_FLAG) { val &= ~NONBLOCK_FLAG;