[oe] [meta-oe][PATCH 1/2] collectd: Fix build with glibc 2.30

Khem Raj raj.khem at gmail.com
Sat Jul 27 20:06:13 UTC 2019


Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 .../0001-Remove-including-sys-sysctl.h.patch  | 81 +++++++++++++++++++
 .../collectd/collectd_5.8.1.bb                |  1 +
 2 files changed, 82 insertions(+)
 create mode 100644 meta-oe/recipes-extended/collectd/collectd/0001-Remove-including-sys-sysctl.h.patch

diff --git a/meta-oe/recipes-extended/collectd/collectd/0001-Remove-including-sys-sysctl.h.patch b/meta-oe/recipes-extended/collectd/collectd/0001-Remove-including-sys-sysctl.h.patch
new file mode 100644
index 0000000000..450cdd0e5f
--- /dev/null
+++ b/meta-oe/recipes-extended/collectd/collectd/0001-Remove-including-sys-sysctl.h.patch
@@ -0,0 +1,81 @@
+From e06c1b4259533ef7a396da841cbf950baccd8c11 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Sat, 27 Jul 2019 12:20:22 -0700
+Subject: [PATCH] Remove including sys/sysctl.h
+
+Glibc 2.30 has added deprecation notice and collectd detects it as
+warning
+
+Fixes
+sys/sysctl.h:21:2: error: "The <sys/sysctl.h> header is deprecated and will be removed." [-Werror,-W#warnings]
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ src/contextswitch.c | 4 ----
+ src/memory.c        | 3 ---
+ src/swap.c          | 3 ---
+ src/uuid.c          | 4 ----
+ 4 files changed, 14 deletions(-)
+
+diff --git a/src/contextswitch.c b/src/contextswitch.c
+index 461fb0a..75d42ae 100644
+--- a/src/contextswitch.c
++++ b/src/contextswitch.c
+@@ -26,10 +26,6 @@
+ #include "common.h"
+ #include "plugin.h"
+ 
+-#ifdef HAVE_SYS_SYSCTL_H
+-#include <sys/sysctl.h>
+-#endif
+-
+ #if HAVE_SYSCTLBYNAME
+ /* no global variables */
+ /* #endif HAVE_SYSCTLBYNAME */
+diff --git a/src/memory.c b/src/memory.c
+index e49fe84..41996d5 100644
+--- a/src/memory.c
++++ b/src/memory.c
+@@ -28,9 +28,6 @@
+ #include "common.h"
+ #include "plugin.h"
+ 
+-#ifdef HAVE_SYS_SYSCTL_H
+-#include <sys/sysctl.h>
+-#endif
+ #ifdef HAVE_SYS_VMMETER_H
+ #include <sys/vmmeter.h>
+ #endif
+diff --git a/src/swap.c b/src/swap.c
+index 78f05c5..2488a5b 100644
+--- a/src/swap.c
++++ b/src/swap.c
+@@ -49,9 +49,6 @@
+ #if HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif
+-#if HAVE_SYS_SYSCTL_H
+-#include <sys/sysctl.h>
+-#endif
+ #if HAVE_SYS_DKSTAT_H
+ #include <sys/dkstat.h>
+ #endif
+diff --git a/src/uuid.c b/src/uuid.c
+index 1cb9027..1c6cdc6 100644
+--- a/src/uuid.c
++++ b/src/uuid.c
+@@ -29,10 +29,6 @@
+ #include "common.h"
+ #include "plugin.h"
+ 
+-#if HAVE_SYS_SYSCTL_H
+-#include <sys/sysctl.h>
+-#endif
+-
+ #define UUID_RAW_LENGTH 16
+ #define UUID_PRINTABLE_COMPACT_LENGTH (UUID_RAW_LENGTH * 2)
+ #define UUID_PRINTABLE_NORMAL_LENGTH (UUID_PRINTABLE_COMPACT_LENGTH + 4)
+-- 
+2.22.0
+
diff --git a/meta-oe/recipes-extended/collectd/collectd_5.8.1.bb b/meta-oe/recipes-extended/collectd/collectd_5.8.1.bb
index 6dff18c16b..ed8b8a5d2b 100644
--- a/meta-oe/recipes-extended/collectd/collectd_5.8.1.bb
+++ b/meta-oe/recipes-extended/collectd/collectd_5.8.1.bb
@@ -14,6 +14,7 @@ SRC_URI = "http://collectd.org/files/collectd-${PV}.tar.bz2 \
            file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \
            file://0005-Disable-new-gcc8-warnings.patch \
            file://0006-libcollectdclient-Fix-string-overflow-errors.patch \
+           file://0001-Remove-including-sys-sysctl.h.patch \
            "
 SRC_URI[md5sum] = "bfce96c42cede5243028510bcc57c1e6"
 SRC_URI[sha256sum] = "e796fda27ce06377f491ad91aa286962a68c2b54076aa77a29673d53204453da"
-- 
2.22.0



More information about the Openembedded-devel mailing list