mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-21 05:14:15 -04:00
Function fcntl() only takes 2 args when using F_GETFL.
This commit is contained in:
1 parent
e8b21fe406
commit
ff530f04a0
1 file changed
+2
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user