[sysctl] Fix breakage on systems with older glibc
Changes
1 files changed · +7 −0
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| kernel/sysctl_binary.c | modified | +7 | −0 | View file |
kernel/sysctl_binary.c
View filediff --git a/kernel/sysctl_binary.c b/kernel/sysctl_binary.c
index b75dbf4..112533d 100644
--- a/kernel/sysctl_binary.c
+++ b/kernel/sysctl_binary.c
@@ -1399,6 +1399,13 @@ static void deprecated_sysctl_warning(const int *name, int nlen)
{
int i;
+ /*
+ * CTL_KERN/KERN_VERSION is used by older glibc and cannot
+ * ever go away.
+ */
+ if (name[0] == CTL_KERN && name[1] == KERN_VERSION)
+ return;
+
if (printk_ratelimit()) {
printk(KERN_INFO
"warning: process `%s' used the deprecated sysctl "