1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

Linux: Assume and consolidate socket 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:
Adhemerval Zanella Netto
2022-10-19 19:14:22 -03:00
committed by Adhemerval Zanella
parent 215bf99347
commit 1fed1a5af4
10 changed files with 5 additions and 14 deletions

View File

@@ -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
__socket (int fd, int type, int domain)
{
#ifdef __ASSUME_SOCKET_SYSCALL
return INLINE_SYSCALL (socket, 3, fd, type, domain);
return INLINE_SYSCALL_CALL (socket, fd, type, domain);
#else
return SOCKETCALL (socket, fd, type, domain);
#endif