mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Linux: Assume and consolidate bind wire-up syscall
And disable if kernel does not support it. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
committed by
Adhemerval Zanella
parent
a33919698b
commit
215bf99347
@ -15,19 +15,14 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include <socketcall.h>
|
||||
#include <kernel-features.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
int
|
||||
__bind (int fd, __CONST_SOCKADDR_ARG addr, socklen_t len)
|
||||
{
|
||||
#ifdef __ASSUME_BIND_SYSCALL
|
||||
return INLINE_SYSCALL (bind, 3, fd, addr.__sockaddr__, len);
|
||||
return INLINE_SYSCALL_CALL (bind, fd, addr.__sockaddr__, len);
|
||||
#else
|
||||
return SOCKETCALL (bind, fd, addr.__sockaddr__, len, 0, 0, 0);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user