mirror of https://github.com/ericonr/sndio.git
don't use openbsd-specific SOCK_CLOEXEC
This commit is contained in:
parent
debf3b302c
commit
b989e17c05
|
@ -342,7 +342,7 @@ aucat_connect_tcp(struct aucat *hdl, char *host, unsigned int unit)
|
|||
}
|
||||
s = -1;
|
||||
for (ai = ailist; ai != NULL; ai = ai->ai_next) {
|
||||
s = socket(ai->ai_family, ai->ai_socktype | SOCK_CLOEXEC,
|
||||
s = socket(ai->ai_family, ai->ai_socktype,
|
||||
ai->ai_protocol);
|
||||
if (s < 0) {
|
||||
DPERROR("socket");
|
||||
|
@ -384,7 +384,7 @@ aucat_connect_un(struct aucat *hdl, unsigned int unit)
|
|||
snprintf(ca.sun_path, sizeof(ca.sun_path),
|
||||
"/tmp/aucat-%u/%s%u", uid, AUCAT_PATH, unit);
|
||||
ca.sun_family = AF_UNIX;
|
||||
s = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
|
||||
s = socket(AF_UNIX, SOCK_STREAM, 0);
|
||||
if (s < 0)
|
||||
return 0;
|
||||
while (connect(s, (struct sockaddr *)&ca, len) < 0) {
|
||||
|
|
Loading…
Reference in New Issue