Commit ff530f04 authored by Wayne Davison's avatar Wayne Davison

Function fcntl() only takes 2 args when using F_GETFL.

parent e8b21fe4
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment