mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-31 14:01:18 +08:00
linux: Consolidate Linux getsockopt implementation
This patch consolidates the getsockopt Linux syscall implementation on sysdeps/unix/sysv/linux/getsockopt.c. The changes are: 1. Remove it from auto-generation syscalls.list on all architectures. 2. Add __ASSUME_GETSOCKOPT_SYSCALL as default and undef if for specific kernel versions on some architectures. This also fix a potential issue where 32-bit time_t ABI should use the linux getsockopt which overrides the underlying SO_* constants used for socket timestamping for _TIME_BITS=64. Checked on x86_64-linux-gnu and i686-linux-gnu.
This commit is contained in:
parent
b156c5f0a7
commit
1c46663a70
@ -8,7 +8,6 @@ getpriority - getpriority i:ii __getpriority getpriority
|
||||
bind - bind i:ipi __bind bind
|
||||
getpeername - getpeername i:ipp __getpeername getpeername
|
||||
getsockname - getsockname i:ipp __getsockname getsockname
|
||||
getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
|
||||
listen - listen i:ii __listen listen
|
||||
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
|
||||
shutdown - shutdown i:ii __shutdown shutdown
|
||||
|
@ -25,7 +25,6 @@ personality EXTRA personality Ei:i __personality personality
|
||||
bind - bind i:ipi __bind bind
|
||||
getpeername - getpeername i:ipp __getpeername getpeername
|
||||
getsockname - getsockname i:ipp __getsockname getsockname
|
||||
getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
|
||||
listen - listen i:ii __listen listen
|
||||
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
|
||||
shutdown - shutdown i:ii __shutdown shutdown
|
||||
|
@ -8,5 +8,4 @@ listen - listen i:ii __listen listen
|
||||
getsockname - getsockname i:ipp __getsockname getsockname
|
||||
getpeername - getpeername i:ipp __getpeername getpeername
|
||||
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
|
||||
getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
|
||||
shutdown - shutdown i:ii __shutdown shutdown
|
||||
|
@ -4,7 +4,6 @@
|
||||
bind - bind i:ipi __bind bind
|
||||
getpeername - getpeername i:ipp __getpeername getpeername
|
||||
getsockname - getsockname i:ipp __getsockname getsockname
|
||||
getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
|
||||
listen - listen i:ii __listen listen
|
||||
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
|
||||
shutdown - shutdown i:ii __shutdown shutdown
|
||||
|
@ -23,7 +23,6 @@
|
||||
# define __ASSUME_SOCKETPAIR_SYSCALL 1
|
||||
# define __ASSUME_BIND_SYSCALL 1
|
||||
# define __ASSUME_LISTEN_SYSCALL 1
|
||||
# define __ASSUME_GETSOCKOPT_SYSCALL 1
|
||||
# define __ASSUME_SETSOCKOPT_SYSCALL 1
|
||||
# define __ASSUME_GETSOCKNAME_SYSCALL 1
|
||||
# define __ASSUME_GETPEERNAME_SYSCALL 1
|
||||
@ -41,6 +40,7 @@
|
||||
# undef __ASSUME_CONNECT_SYSCALL
|
||||
# undef __ASSUME_RECVFROM_SYSCALL
|
||||
# undef __ASSUME_SENDTO_SYSCALL
|
||||
# undef __ASSUME_GETSOCKOPT_SYSCALL
|
||||
#endif
|
||||
|
||||
/* i686 only supports ipc syscall before 5.1. */
|
||||
|
@ -6,7 +6,6 @@ getpriority - getpriority i:ii __getpriority getpriority
|
||||
bind - bind i:ipi __bind bind
|
||||
getpeername - getpeername i:ipp __getpeername getpeername
|
||||
getsockname - getsockname i:ipp __getsockname getsockname
|
||||
getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
|
||||
listen - listen i:ii __listen listen
|
||||
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
|
||||
shutdown - shutdown i:ii __shutdown shutdown
|
||||
|
@ -77,6 +77,7 @@
|
||||
#define __ASSUME_ACCEPT4_SYSCALL 1
|
||||
#define __ASSUME_RECVMMSG_SYSCALL 1
|
||||
#define __ASSUME_SENDMMSG_SYSCALL 1
|
||||
#define __ASSUME_GETSOCKOPT_SYSCALL 1
|
||||
|
||||
/* Support for SysV IPC through wired syscalls. All supported architectures
|
||||
either support ipc syscall and/or all the ipc correspondent syscalls. */
|
||||
|
@ -23,7 +23,6 @@
|
||||
# define __ASSUME_SOCKETPAIR_SYSCALL 1
|
||||
# define __ASSUME_BIND_SYSCALL 1
|
||||
# define __ASSUME_LISTEN_SYSCALL 1
|
||||
# define __ASSUME_GETSOCKOPT_SYSCALL 1
|
||||
# define __ASSUME_SETSOCKOPT_SYSCALL 1
|
||||
# define __ASSUME_GETSOCKNAME_SYSCALL 1
|
||||
# define __ASSUME_GETPEERNAME_SYSCALL 1
|
||||
@ -43,6 +42,7 @@
|
||||
# undef __ASSUME_CONNECT_SYSCALL
|
||||
# undef __ASSUME_RECVFROM_SYSCALL
|
||||
# undef __ASSUME_SENDTO_SYSCALL
|
||||
# undef __ASSUME_GETSOCKOPT_SYSCALL
|
||||
#endif
|
||||
|
||||
/* No support for PI futexes or robust mutexes before 3.10 for m68k. */
|
||||
|
@ -28,7 +28,6 @@
|
||||
#define __ASSUME_SEND_SYSCALL 1
|
||||
#define __ASSUME_RECV_SYSCALL 1
|
||||
#define __ASSUME_SHUTDOWN_SYSCALL 1
|
||||
#define __ASSUME_GETSOCKOPT_SYSCALL 1
|
||||
#define __ASSUME_SETSOCKOPT_SYSCALL 1
|
||||
|
||||
#include_next <kernel-features.h>
|
||||
|
@ -15,7 +15,6 @@ sysmips - sysmips i:iiii __sysmips sysmips
|
||||
bind - bind i:ipi __bind bind
|
||||
getpeername - getpeername i:ipp __getpeername getpeername
|
||||
getsockname - getsockname i:ipp __getsockname getsockname
|
||||
getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
|
||||
listen - listen i:ii __listen listen
|
||||
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
|
||||
shutdown - shutdown i:ii __shutdown shutdown
|
||||
|
@ -28,7 +28,6 @@
|
||||
#define __ASSUME_SEND_SYSCALL 1
|
||||
#define __ASSUME_RECV_SYSCALL 1
|
||||
#define __ASSUME_SHUTDOWN_SYSCALL 1
|
||||
#define __ASSUME_GETSOCKOPT_SYSCALL 1
|
||||
#define __ASSUME_SETSOCKOPT_SYSCALL 1
|
||||
|
||||
/* Define this if your 32-bit syscall API requires 64-bit register
|
||||
|
@ -23,7 +23,6 @@
|
||||
# define __ASSUME_SOCKETPAIR_SYSCALL 1
|
||||
# define __ASSUME_BIND_SYSCALL 1
|
||||
# define __ASSUME_LISTEN_SYSCALL 1
|
||||
# define __ASSUME_GETSOCKOPT_SYSCALL 1
|
||||
# define __ASSUME_SETSOCKOPT_SYSCALL 1
|
||||
# define __ASSUME_GETSOCKNAME_SYSCALL 1
|
||||
# define __ASSUME_GETPEERNAME_SYSCALL 1
|
||||
@ -43,6 +42,7 @@
|
||||
# undef __ASSUME_CONNECT_SYSCALL
|
||||
# undef __ASSUME_RECVFROM_SYSCALL
|
||||
# undef __ASSUME_SENDTO_SYSCALL
|
||||
# undef __ASSUME_GETSOCKOPT_SYSCALL
|
||||
#endif
|
||||
|
||||
/* s390 only supports ipc syscall before 5.1. */
|
||||
|
@ -33,7 +33,6 @@
|
||||
#define __ASSUME_SEND_SYSCALL 1
|
||||
#define __ASSUME_RECV_SYSCALL 1
|
||||
#define __ASSUME_SHUTDOWN_SYSCALL 1
|
||||
#define __ASSUME_GETSOCKOPT_SYSCALL 1
|
||||
#define __ASSUME_SETSOCKOPT_SYSCALL 1
|
||||
|
||||
#include_next <kernel-features.h>
|
||||
|
@ -38,10 +38,10 @@
|
||||
# undef __ASSUME_CONNECT_SYSCALL
|
||||
# undef __ASSUME_RECVFROM_SYSCALL
|
||||
# undef __ASSUME_SENDTO_SYSCALL
|
||||
# undef __ASSUME_GETSOCKOPT_SYSCALL
|
||||
#else
|
||||
# define __ASSUME_SOCKET_SYSCALL 1
|
||||
# define __ASSUME_SOCKETPAIR_SYSCALL 1
|
||||
# define __ASSUME_GETSOCKOPT_SYSCALL 1
|
||||
# define __ASSUME_SHUTDOWN_SYSCALL 1
|
||||
#endif
|
||||
|
||||
|
@ -9,7 +9,6 @@ syscall_clock_gettime EXTRA clock_gettime Ei:ip __syscall_clock_gettime
|
||||
bind - bind i:ipi __bind bind
|
||||
getpeername - getpeername i:ipp __getpeername getpeername
|
||||
getsockname - getsockname i:ipp __getsockname getsockname
|
||||
getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
|
||||
listen - listen i:ii __listen listen
|
||||
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
|
||||
shutdown - shutdown i:ii __shutdown shutdown
|
||||
|
Loading…
x
Reference in New Issue
Block a user