diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-10-18 16:28:44 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-02-20 10:20:37 -0300 |
commit | a7bf5f4e699a77529171a5fd3eccd842c5c29827 (patch) | |
tree | 9af14d7d3bf60659e0f30cf33281bfae24f8afe6 /sysdeps/unix/sysv/linux/getsockname.c | |
parent | 6008978f065e205d986e51e0dabbb7e50bc45914 (diff) | |
download | glibc-a7bf5f4e699a77529171a5fd3eccd842c5c29827.tar.gz glibc-a7bf5f4e699a77529171a5fd3eccd842c5c29827.tar.xz glibc-a7bf5f4e699a77529171a5fd3eccd842c5c29827.zip |
Linux: Assume and consolidate getsockname 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>
Diffstat (limited to 'sysdeps/unix/sysv/linux/getsockname.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/getsockname.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/getsockname.c b/sysdeps/unix/sysv/linux/getsockname.c index 38e6f2dac6..61973fa5cd 100644 --- a/sysdeps/unix/sysv/linux/getsockname.c +++ b/sysdeps/unix/sysv/linux/getsockname.c @@ -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 __getsockname (int fd, __SOCKADDR_ARG addr, socklen_t *len) { #ifdef __ASSUME_GETSOCKNAME_SYSCALL - return INLINE_SYSCALL (getsockname, 3, fd, addr.__sockaddr__, len); + return INLINE_SYSCALL_CALL (getsockname, fd, addr.__sockaddr__, len); #else return SOCKETCALL (getsockname, fd, addr.__sockaddr__, len); #endif |