mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
netbsd: NetBSD ships with paccept(2) a superset of Linux-specific accept4()
[diwic: Moved paccept to #bsd line in configure.ac]
This commit is contained in:
parent
30a9523b75
commit
3753f50755
2 changed files with 8 additions and 1 deletions
|
|
@ -3501,6 +3501,8 @@ finish:
|
|||
int pa_accept_cloexec(int sockfd, struct sockaddr *addr, socklen_t *addrlen) {
|
||||
int fd;
|
||||
|
||||
errno = 0;
|
||||
|
||||
#ifdef HAVE_ACCEPT4
|
||||
if ((fd = accept4(sockfd, addr, addrlen, SOCK_CLOEXEC)) >= 0)
|
||||
goto finish;
|
||||
|
|
@ -3510,6 +3512,11 @@ int pa_accept_cloexec(int sockfd, struct sockaddr *addr, socklen_t *addrlen) {
|
|||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PACCEPT
|
||||
if ((fd = paccept(sockfd, addr, addrlen, NULL, SOCK_CLOEXEC)) >= 0)
|
||||
goto finish;
|
||||
#endif
|
||||
|
||||
if ((fd = accept(sockfd, addr, addrlen)) >= 0)
|
||||
goto finish;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue