@@ -88,6 +88,9 @@ libc {
GLIBC_2.27 {
getrlimit; setrlimit; getrlimit64; setrlimit64;
}
+ GLIBC_2.28 {
+ sysctl;
+ }
GLIBC_PRIVATE {
__libc_alpha_cache_shape;
}
@@ -2054,6 +2054,8 @@ GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
GLIBC_2.27 wcstof64x F
GLIBC_2.27 wcstof64x_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -10,6 +10,9 @@ libc {
GLIBC_2.24 {
recvmsg; sendmsg;
}
+ GLIBC_2.28 {
+ sysctl;
+ }
GLIBC_PRIVATE {
# A copy of sigaction lives in libpthread, and needs these.
__default_sa_restorer; __default_rt_sa_restorer;
@@ -61,14 +61,31 @@ static struct {
*/
static int
+sysctl_call (int *name, int nlen, void *oldval, size_t *oldlenp,
+ void *newval, size_t newlen)
+{
+ struct kernel_sysctl_args
+ {
+ int *name;
+ int nlen;
+ void *oldval;
+ size_t *oldlenp;
+ void *newval;
+ size_t newlen;
+ unsigned long __unused[4];
+ } args = { name, nlen, oldval, oldlenp, newval, newlen };
+ return INLINE_SYSCALL_CALL (_sysctl, &args);
+}
+
+static int
init_iosys (void)
{
static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
size_t len = sizeof(io.base);
- if (! __sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
- && ! __sysctl (ioshift_name, 3, &io.shift, &len, NULL, 0))
+ if (! sysctl_call (iobase_name, 3, &io.io_base, &len, NULL, 0)
+ && ! sysctl_call (ioshift_name, 3, &io.shift, &len, NULL, 0))
{
io.initdone = 1;
return 0;
@@ -130,6 +130,8 @@ GLIBC_2.27 wcstof32x F
GLIBC_2.27 wcstof32x_l F
GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
GLIBC_2.4 GLIBC_2.4 A
GLIBC_2.4 _Exit F
GLIBC_2.4 _IO_2_1_stderr_ D 0xa0
deleted file mode 100644
@@ -1,32 +0,0 @@
-/* Copyright (C) 2011-2018 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-/* This deprecated syscall is no longer used (replaced with /proc/sys). */
-int
-sysctl (int *name, int nlen, void *oldval, size_t *oldlenp,
- void *newval, size_t newlen)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-stub_warning (sysctl)
@@ -35,4 +35,7 @@ libc {
GLIBC_2.19 {
fanotify_mark;
}
+ GLIBC_2.28 {
+ sysctl;
+ }
}
@@ -1894,6 +1894,8 @@ GLIBC_2.27 wcstof32x F
GLIBC_2.27 wcstof32x_l F
GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -45,6 +45,9 @@ libc {
# f*
fallocate64;
}
+ GLIBC_2.28 {
+ sysctl;
+ }
GLIBC_PRIVATE {
__modify_ldt; __uname;
}
@@ -2064,6 +2064,8 @@ GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
GLIBC_2.27 wcstof64x F
GLIBC_2.27 wcstof64x_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -25,6 +25,9 @@ libc {
GLIBC_2.24 {
recvmsg; sendmsg;
}
+ GLIBC_2.28 {
+ sysctl;
+ }
}
libpthread {
GLIBC_2.3.3 {
@@ -1928,6 +1928,8 @@ GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
GLIBC_2.27 wcstof64x F
GLIBC_2.27 wcstof64x_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -40,6 +40,9 @@ libc {
GLIBC_2.12 {
__m68k_read_tp;
}
+ GLIBC_2.28 {
+ sysctl;
+ }
GLIBC_PRIVATE {
__vdso_atomic_cmpxchg_32; __vdso_atomic_barrier;
}
@@ -131,6 +131,8 @@ GLIBC_2.27 wcstof32x F
GLIBC_2.27 wcstof32x_l F
GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
GLIBC_2.4 GLIBC_2.4 A
GLIBC_2.4 _Exit F
GLIBC_2.4 _IO_2_1_stderr_ D 0x98
@@ -2008,6 +2008,8 @@ GLIBC_2.27 wcstof32x F
GLIBC_2.27 wcstof32x_l F
GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -2,4 +2,7 @@ libc {
GLIBC_2.18 {
fallocate64;
}
+ GLIBC_2.28 {
+ sysctl;
+ }
}
@@ -2129,3 +2129,5 @@ GLIBC_2.27 wcstof32x F
GLIBC_2.27 wcstof32x_l F
GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
@@ -37,6 +37,9 @@ libc {
GLIBC_2.11 {
fallocate64;
}
+ GLIBC_2.28 {
+ sysctl;
+ }
GLIBC_PRIVATE {
# nptl/pthread_cond_timedwait.c uses INTERNAL_VSYSCALL(clock_gettime).
__vdso_clock_gettime;
@@ -1983,6 +1983,8 @@ GLIBC_2.27 wcstof32x F
GLIBC_2.27 wcstof32x_l F
GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -1981,6 +1981,8 @@ GLIBC_2.27 wcstof32x F
GLIBC_2.27 wcstof32x_l F
GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -1989,6 +1989,8 @@ GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
GLIBC_2.27 wcstof64x F
GLIBC_2.27 wcstof64x_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -1984,6 +1984,8 @@ GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
GLIBC_2.27 wcstof64x F
GLIBC_2.27 wcstof64x_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -5,6 +5,9 @@ ld {
}
}
libc {
+ GLIBC_2.28 {
+ sysctl;
+ }
GLIBC_PRIVATE {
__vdso_get_tbfreq;
__vdso_clock_gettime;
@@ -2012,6 +2012,8 @@ GLIBC_2.27 wcstof32x F
GLIBC_2.27 wcstof32x_l F
GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -2017,6 +2017,8 @@ GLIBC_2.27 wcstof32x F
GLIBC_2.27 wcstof32x_l F
GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -2229,3 +2229,5 @@ GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
GLIBC_2.27 wcstof64x F
GLIBC_2.27 wcstof64x_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
@@ -131,6 +131,8 @@ GLIBC_2.27 wcstof32x F
GLIBC_2.27 wcstof32x_l F
GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 _Exit F
GLIBC_2.3 _IO_2_1_stderr_ D 0xe0
@@ -3,6 +3,9 @@ libc {
__longjmp_chk;
getcontext;
}
+ GLIBC_2.28 {
+ sysctl;
+ }
GLIBC_PRIVATE {
__vdso_clock_gettime;
__vdso_clock_getres;
@@ -2022,6 +2022,8 @@ GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
GLIBC_2.27 wcstof64x F
GLIBC_2.27 wcstof64x_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -1923,6 +1923,8 @@ GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
GLIBC_2.27 wcstof64x F
GLIBC_2.27 wcstof64x_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -30,4 +30,7 @@ libc {
GLIBC_2.16 {
fanotify_mark;
}
+ GLIBC_2.28 {
+ sysctl;
+ }
}
@@ -1898,6 +1898,8 @@ GLIBC_2.27 wcstof32x F
GLIBC_2.27 wcstof32x_l F
GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -29,6 +29,9 @@ libc {
__getshmlba;
}
+ GLIBC_2.28 {
+ sysctl;
+ }
}
libpthread {
@@ -2015,6 +2015,8 @@ GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
GLIBC_2.27 wcstof64x F
GLIBC_2.27 wcstof64x_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -1952,6 +1952,8 @@ GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
GLIBC_2.27 wcstof64x F
GLIBC_2.27 wcstof64x_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -16,18 +16,37 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <unistd.h>
#include <errno.h>
-#include <string.h> /* For the real memset prototype. */
-#include <sys/sysctl.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
+#include <shlib-compat.h>
+/* This deprecated syscall is no longer used (replaced with /proc/sys). */
int
-__sysctl (int *name, int nlen, void *oldval, size_t *oldlenp,
- void *newval, size_t newlen)
+__deprecated_sysctl (int *name, int nlen, void *oldval, size_t *oldlenp,
+ void *newval, size_t newlen)
{
- struct __sysctl_args args =
+ __set_errno (ENOSYS);
+ return -1;
+}
+#ifndef __NR__sysctl
+weak_alias (__deprecated_sysctl, sysctl)
+#else
+versioned_symbol (libc, __deprecated_sysctl, sysctl, GLIBC_2_28);
+# if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_28)
+int
+__old_sysctl (int *name, int nlen, void *oldval, size_t *oldlenp,
+ void *newval, size_t newlen)
+{
+ struct kernel_sysctl_args
+ {
+ int *name;
+ int nlen;
+ void *oldval;
+ size_t *oldlenp;
+ void *newval;
+ size_t newlen;
+ unsigned long __unused[4];
+ } args =
{
.name = name,
.nlen = nlen,
@@ -37,7 +56,10 @@ __sysctl (int *name, int nlen, void *oldval, size_t *oldlenp,
.newlen = newlen
};
- return INLINE_SYSCALL (_sysctl, 1, &args);
+ return INLINE_SYSCALL_CALL (_sysctl, &args);
}
-libc_hidden_def (__sysctl)
-weak_alias (__sysctl, sysctl)
+compat_symbol (libc, __old_sysctl, sysctl, GLIBC_2_0);
+strong_alias (__old_sysctl, __sysctl)
+# endif
+#endif
+stub_warning (sysctl)
@@ -1905,6 +1905,8 @@ GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
GLIBC_2.27 wcstof64x F
GLIBC_2.27 wcstof64x_l F
+GLIBC_2.28 GLIBC_2.28 A
+GLIBC_2.28 sysctl F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -6,6 +6,9 @@ libc {
modify_ldt;
}
+ GLIBC_2.28 {
+ sysctl;
+ }
}
librt {
@@ -2148,3 +2148,4 @@ GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
GLIBC_2.27 wcstof64x F
GLIBC_2.27 wcstof64x_l F
+GLIBC_2.28 GLIBC_2.28 A