Switch NetBSD from paccept(2) to accept4(2)

Summary:
NetBSD 8.0 will ship with accept4(2) in libc wrapping paccept(2).

This change reduces needless difference with other platforms.

Older versions of NetBSD will not be supported.

No functional change.

Sponsored by <The NetBSD Foundation>

Reviewers: joerg, emaste, labath, clayborg

Reviewed By: emaste, labath, clayborg

Subscribers: #lldb

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D30288

llvm-svn: 296070
This commit is contained in:
Kamil Rytarowski 2017-02-24 01:51:38 +00:00
parent f51d804a9f
commit 8fbf3b04ae
1 changed files with 0 additions and 4 deletions

View File

@ -443,11 +443,7 @@ NativeSocket Socket::AcceptSocket(NativeSocket sockfd, struct sockaddr *addr,
if (!child_processes_inherit) {
flags |= SOCK_CLOEXEC;
}
#if defined(__NetBSD__)
NativeSocket fd = ::paccept(sockfd, addr, addrlen, nullptr, flags);
#else
NativeSocket fd = ::accept4(sockfd, addr, addrlen, flags);
#endif
#else
NativeSocket fd = ::accept(sockfd, addr, addrlen);
#endif