mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -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
|
|
@ -569,7 +569,7 @@ AC_CHECK_FUNCS_ONCE([ctime_r usleep])
|
|||
AC_CHECK_FUNCS_ONCE([strerror_r])
|
||||
|
||||
# BSD
|
||||
AC_CHECK_FUNCS_ONCE([lstat])
|
||||
AC_CHECK_FUNCS_ONCE([lstat paccept])
|
||||
|
||||
# Non-standard
|
||||
AC_CHECK_FUNCS_ONCE([setresuid setresgid setreuid setregid seteuid setegid ppoll strsignal sig2str strtod_l pipe2 accept4])
|
||||
|
|
|
|||
|
|
@ -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