projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove obsolete and unused gethostbyaddr implementation
[musl]
/
src
/
network
/
socket.c
diff --git
a/src/network/socket.c
b/src/network/socket.c
index
51be30e
..
a2e92d9
100644
(file)
--- a/
src/network/socket.c
+++ b/
src/network/socket.c
@@
-13,9
+13,9
@@
int socket(int domain, int type, int protocol)
protocol, 0, 0, 0);
if (s < 0) return s;
if (type & SOCK_CLOEXEC)
protocol, 0, 0, 0);
if (s < 0) return s;
if (type & SOCK_CLOEXEC)
-
fcntl(
s, F_SETFD, FD_CLOEXEC);
+
__syscall(SYS_fcntl,
s, F_SETFD, FD_CLOEXEC);
if (type & SOCK_NONBLOCK)
if (type & SOCK_NONBLOCK)
-
fcntl(s, F_SETFL, fcntl(s, F_GETFL) |
O_NONBLOCK);
+
__syscall(SYS_fcntl, s, F_SETFL,
O_NONBLOCK);
}
return s;
}
}
return s;
}