diff options
-rw-r--r-- | ChangeLog | 28 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/kernel-features.h | 25 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list | 3 |
3 files changed, 52 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index 67abf144c9..96f6ce52d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,31 @@ +2018-11-01 Joseph Myers <joseph@codesourcery.com> + + [BZ #23848] + * sysdeps/unix/sysv/linux/sparc/kernel-features.h [!__arch64__ && + __LINUX_KERNEL_VERSION < 0x040400] (__ASSUME_SENDMSG_SYSCALL): + Undefine. + [!__arch64__ && __LINUX_KERNEL_VERSION < 0x040400] + (__ASSUME_RECVMSG_SYSCALL): Likewise. + [!__arch64__ && __LINUX_KERNEL_VERSION < 0x040400] + (__ASSUME_SENDTO_SYSCALL): Likewise. + [!__arch64__ && __LINUX_KERNEL_VERSION < 0x040400] + (__ASSUME_ACCEPT_SYSCALL): Undefine under this condition, not just + [!__arch64__]. + [!__arch64__ && __LINUX_KERNEL_VERSION < 0x040400] + (__ASSUME_CONNECT_SYSCALL): Likewise. + [!__arch64__ && __LINUX_KERNEL_VERSION < 0x040400] + (__ASSUME_RECVFROM_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x040400] (__ASSUME_BIND_SYSCALL): + Define. + [__LINUX_KERNEL_VERSION >= 0x040400] (__ASSUME_LISTEN_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x040400] + (__ASSUME_SETSOCKOPT_SYSCALL): Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (bind): + Remove. + (listen): Likewise. + (setsockopt): Likewise. + 2018-11-01 Fredrik Noring <noring@nocrew.org> * sysdeps/mips/sys/tas.h (_test_and_set): Handle the R5900 CPU diff --git a/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/sysdeps/unix/sysv/linux/sparc/kernel-features.h index 91990a716f..fd48081a77 100644 --- a/sysdeps/unix/sysv/linux/sparc/kernel-features.h +++ b/sysdeps/unix/sysv/linux/sparc/kernel-features.h @@ -28,11 +28,34 @@ # undef __ASSUME_SET_ROBUST_LIST #endif -#if !defined __arch64__ +/* These syscalls were added for 32-bit in 4.4 (but present for 64-bit + in all supported kernel versions); the architecture-independent + kernel-features.h assumes some of them to be present by default. + getpeername and getsockname syscalls were also added for 32-bit in + 4.4, but only for 32-bit kernels, not in the compat syscall table + for 64-bit kernels. */ +#if !defined __arch64__ && __LINUX_KERNEL_VERSION < 0x040400 +# undef __ASSUME_SENDMSG_SYSCALL +# undef __ASSUME_RECVMSG_SYSCALL # undef __ASSUME_ACCEPT_SYSCALL # undef __ASSUME_CONNECT_SYSCALL # undef __ASSUME_RECVFROM_SYSCALL +# undef __ASSUME_SENDTO_SYSCALL #else +# define __ASSUME_SOCKET_SYSCALL 1 +# define __ASSUME_SOCKETPAIR_SYSCALL 1 +# define __ASSUME_GETSOCKOPT_SYSCALL 1 +# define __ASSUME_SHUTDOWN_SYSCALL 1 +#endif + +/* These syscalls were added for both 32-bit and 64-bit in 4.4. */ +#if __LINUX_KERNEL_VERSION >= 0x040400 +# define __ASSUME_BIND_SYSCALL 1 +# define __ASSUME_LISTEN_SYSCALL 1 +# define __ASSUME_SETSOCKOPT_SYSCALL 1 +#endif + +#ifdef __arch64__ /* sparc64 defines __NR_pause, however it is not supported (ENOSYS). Undefine so pause.c can use a correct alternative. */ # undef __NR_pause diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list index 33082f31eb..d30d7f2b96 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list @@ -1,10 +1,7 @@ # File name Caller Syscall name # args Strong name Weak names -bind - bind 3 __bind bind getpeername - getpeername 3 __getpeername getpeername getsockname - getsockname 3 __getsockname getsockname getsockopt - getsockopt 5 __getsockopt getsockopt -listen - listen 2 __listen listen -setsockopt - setsockopt 5 __setsockopt setsockopt shutdown - shutdown 2 __shutdown shutdown socketpair - socketpair 4 __socketpair socketpair |