diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/sysctl.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/sysctl.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/sysdeps/unix/sysv/linux/sysctl.c b/sysdeps/unix/sysv/linux/sysctl.c index 5ea8be8da1..389b958226 100644 --- a/sysdeps/unix/sysv/linux/sysctl.c +++ b/sysdeps/unix/sysv/linux/sysctl.c @@ -1,4 +1,4 @@ -/* Read or write system information. Linux version. +/* sysctl function stub. Copyright (C) 1996-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -17,25 +17,20 @@ <https://www.gnu.org/licenses/>. */ #include <errno.h> -#include <linux/sysctl.h> +#include <shlib-compat.h> -#include <sysdep.h> -#include <sys/syscall.h> - -int -__sysctl (int *name, int nlen, void *oldval, size_t *oldlenp, - void *newval, size_t newlen) +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_32) +int attribute_compat_text_section +___sysctl (int *name, int nlen, void *oldval, size_t *oldlenp, + void *newval, size_t newlen) { - struct __sysctl_args args = - { - .name = name, - .nlen = nlen, - .oldval = oldval, - .oldlenp = oldlenp, - .newval = newval, - .newlen = newlen - }; - - return INLINE_SYSCALL (_sysctl, 1, &args); + __set_errno (ENOSYS); + return -1; } -weak_alias (__sysctl, sysctl) +compat_symbol (libc, ___sysctl, sysctl, GLIBC_2_0); + +# if SHLIB_COMPAT (libc, GLIBC_2_2, GLIBC_2_17) +strong_alias (___sysctl, ___sysctl2) +compat_symbol (libc, ___sysctl2, __sysctl, GLIBC_2_2); +# endif +#endif |