don't use openbsd-specific SOCK_CLOEXEC

This commit is contained in:
Alexandre Ratchov 2015-01-18 00:16:36 +01:00
parent debf3b302c
commit b989e17c05
1 changed files with 2 additions and 2 deletions

View File

@ -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) {