diff --git a/libsndio/aucat.c b/libsndio/aucat.c index 764d700..2ca34ca 100644 --- a/libsndio/aucat.c +++ b/libsndio/aucat.c @@ -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) {