]> granicus.if.org Git - libevent/commitdiff
test: fix regress_http evhttp_bind_unixsocket() on macOS
authorPierce Lopez <pierce.lopez@gmail.com>
Fri, 17 Sep 2021 05:39:46 +0000 (01:39 -0400)
committerPierce Lopez <pierce.lopez@gmail.com>
Fri, 17 Sep 2021 14:33:55 +0000 (10:33 -0400)
needs to use evutil socket helper for SOCK_NONBLOCK / SOCK_CLOEXEC

test/regress_http.c

index c5e5de59475fe9bc8b88116699cb6b306dbbc6df..0bd6dbc168fbf8f245711fcd0d2e6e14b5071fa7 100644 (file)
@@ -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;