[oe-commits] [meta-openembedded] 14/18: collectd: Fix build with glibc 2.30

git at git.openembedded.org git at git.openembedded.org
Wed Jul 31 02:17:13 UTC 2019


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

commit 2332aa3f9ad6310feed4f6aed33e777588801caa
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Sat Jul 27 12:24:50 2019 -0700

    collectd: Fix build with glibc 2.30
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 ...uding-sys-sysctl.h-on-glibc-based-systems.patch | 98 ++++++++++++++++++++++
 .../recipes-extended/collectd/collectd_5.8.1.bb    |  1 +
 2 files changed, 99 insertions(+)

diff --git a/meta-oe/recipes-extended/collectd/collectd/0001-Remove-including-sys-sysctl.h-on-glibc-based-systems.patch b/meta-oe/recipes-extended/collectd/collectd/0001-Remove-including-sys-sysctl.h-on-glibc-based-systems.patch
new file mode 100644
index 0000000..3dee34c
--- /dev/null
+++ b/meta-oe/recipes-extended/collectd/collectd/0001-Remove-including-sys-sysctl.h-on-glibc-based-systems.patch
@@ -0,0 +1,98 @@
+From 090a17ca338a9311d682ecc5933b32bff67cf07f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Sat, 27 Jul 2019 14:20:14 -0700
+Subject: [PATCH] Remove including sys/sysctl.h on glibc based systems
+
+Glibc 2.30 has added deprecation notice and collectd detects it as warning [1]
+
+Fixes
+sys/sysctl.h:21:2: error: "The <sys/sysctl.h> header is deprecated and will be removed." [-Werror,-W#warnings]
+
+[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=744e829637162bb7d5029632aacf341c64b86990
+
+Upstream-Status: Submitted [https://github.com/collectd/collectd/pull/3234]
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ src/contextswitch.c | 2 +-
+ src/memory.c        | 2 +-
+ src/swap.c          | 2 +-
+ src/uuid.c          | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+--- a/src/contextswitch.c
++++ b/src/contextswitch.c
+@@ -26,7 +26,7 @@
+ #include "common.h"
+ #include "plugin.h"
+ 
+-#ifdef HAVE_SYS_SYSCTL_H
++#if defined(HAVE_SYS_SYSCTL_H) && !defined(__GLIBC__)
+ #include <sys/sysctl.h>
+ #endif
+ 
+--- a/src/memory.c
++++ b/src/memory.c
+@@ -28,7 +28,7 @@
+ #include "common.h"
+ #include "plugin.h"
+ 
+-#ifdef HAVE_SYS_SYSCTL_H
++#if defined(HAVE_SYS_SYSCTL_H) && !defined(__GLIBC__)
+ #include <sys/sysctl.h>
+ #endif
+ #ifdef HAVE_SYS_VMMETER_H
+--- a/src/swap.c
++++ b/src/swap.c
+@@ -49,7 +49,7 @@
+ #if HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif
+-#if HAVE_SYS_SYSCTL_H
++#if defined(HAVE_SYS_SYSCTL_H) && !defined(__GLIBC__)
+ #include <sys/sysctl.h>
+ #endif
+ #if HAVE_SYS_DKSTAT_H
+--- a/src/uuid.c
++++ b/src/uuid.c
+@@ -29,7 +29,7 @@
+ #include "common.h"
+ #include "plugin.h"
+ 
+-#if HAVE_SYS_SYSCTL_H
++#if defined(HAVE_SYS_SYSCTL_H) && !defined(__GLIBC__)
+ #include <sys/sysctl.h>
+ #endif
+ 
+--- a/src/cpu.c
++++ b/src/cpu.c
+@@ -60,7 +60,7 @@
+ 
+ #if (defined(HAVE_SYSCTL) && HAVE_SYSCTL) ||                                   \
+     (defined(HAVE_SYSCTLBYNAME) && HAVE_SYSCTLBYNAME)
+-#ifdef HAVE_SYS_SYSCTL_H
++#if defined(HAVE_SYS_SYSCTL_H) && !defined(__GLIBC__)
+ #include <sys/sysctl.h>
+ #endif
+ 
+--- a/src/processes.c
++++ b/src/processes.c
+@@ -82,7 +82,7 @@
+ #if HAVE_MACH_VM_PROT_H
+ #include <mach/vm_prot.h>
+ #endif
+-#if HAVE_SYS_SYSCTL_H
++#if defined(HAVE_SYS_SYSCTL_H) && !defined(__GLIBC__)
+ #include <sys/sysctl.h>
+ #endif
+ /* #endif HAVE_THREAD_INFO */
+--- a/src/uptime.c
++++ b/src/uptime.c
+@@ -33,7 +33,7 @@
+  */
+ /* #endif HAVE_LIBKSTAT */
+ 
+-#elif HAVE_SYS_SYSCTL_H
++#elif defined(HAVE_SYS_SYSCTL_H) && !defined(__GLIBC__)
+ #include <sys/sysctl.h>
+ /* Using sysctl interface to retrieve the boot time on *BSD / Darwin / OS X
+  * systems */
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 6dff18c..0951ac0 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-on-glibc-based-systems.patch \
            "
 SRC_URI[md5sum] = "bfce96c42cede5243028510bcc57c1e6"
 SRC_URI[sha256sum] = "e796fda27ce06377f491ad91aa286962a68c2b54076aa77a29673d53204453da"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list