From: Pierce Lopez Date: Fri, 17 Sep 2021 05:39:46 +0000 (-0400) Subject: test: fix regress_http evhttp_bind_unixsocket() on macOS X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=58d4e50d3c673af49da1e087cbd66991b710df22;p=libevent test: fix regress_http evhttp_bind_unixsocket() on macOS needs to use evutil socket helper for SOCK_NONBLOCK / SOCK_CLOEXEC --- diff --git a/test/regress_http.c b/test/regress_http.c index c5e5de59..0bd6dbc1 100644 --- a/test/regress_http.c +++ b/test/regress_http.c @@ -2238,7 +2238,8 @@ static int evhttp_bind_unixsocket(struct evhttp *httpd, const char *path) if (stat(path, &st) == 0 && S_ISSOCK(st.st_mode)) unlink(path); - fd = socket(AF_UNIX, SOCK_CLOEXEC | SOCK_NONBLOCK | SOCK_STREAM, 0); + fd = evutil_socket_(AF_UNIX, + EVUTIL_SOCK_CLOEXEC | EVUTIL_SOCK_NONBLOCK | SOCK_STREAM, 0); if (fd == -1) return -1;