diff options
| author | Khem Raj <raj.khem@gmail.com> | 2019-07-27 12:24:50 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2019-07-30 19:15:24 -0700 |
| commit | 2332aa3f9ad6310feed4f6aed33e777588801caa (patch) | |
| tree | da18f39e3f2cb74ea7233e2e22b41c197954b8c2 | |
| parent | bc93fe6950af84267c9c0c9074b06528e4915d54 (diff) | |
| download | meta-openembedded-2332aa3f9ad6310feed4f6aed33e777588801caa.tar.gz | |
collectd: Fix build with glibc 2.30
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-extended/collectd/collectd/0001-Remove-including-sys-sysctl.h-on-glibc-based-systems.patch | 98 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/collectd/collectd_5.8.1.bb | 1 |
2 files changed, 99 insertions, 0 deletions
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 0000000000..3dee34cd0a --- /dev/null +++ b/meta-oe/recipes-extended/collectd/collectd/0001-Remove-including-sys-sysctl.h-on-glibc-based-systems.patch | |||
| @@ -0,0 +1,98 @@ | |||
| 1 | From 090a17ca338a9311d682ecc5933b32bff67cf07f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 27 Jul 2019 14:20:14 -0700 | ||
| 4 | Subject: [PATCH] Remove including sys/sysctl.h on glibc based systems | ||
| 5 | |||
| 6 | Glibc 2.30 has added deprecation notice and collectd detects it as warning [1] | ||
| 7 | |||
| 8 | Fixes | ||
| 9 | sys/sysctl.h:21:2: error: "The <sys/sysctl.h> header is deprecated and will be removed." [-Werror,-W#warnings] | ||
| 10 | |||
| 11 | [1] https://sourceware.org/git/?p=glibc.git;a=commit;h=744e829637162bb7d5029632aacf341c64b86990 | ||
| 12 | |||
| 13 | Upstream-Status: Submitted [https://github.com/collectd/collectd/pull/3234] | ||
| 14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 15 | --- | ||
| 16 | src/contextswitch.c | 2 +- | ||
| 17 | src/memory.c | 2 +- | ||
| 18 | src/swap.c | 2 +- | ||
| 19 | src/uuid.c | 2 +- | ||
| 20 | 4 files changed, 4 insertions(+), 4 deletions(-) | ||
| 21 | |||
| 22 | --- a/src/contextswitch.c | ||
| 23 | +++ b/src/contextswitch.c | ||
| 24 | @@ -26,7 +26,7 @@ | ||
| 25 | #include "common.h" | ||
| 26 | #include "plugin.h" | ||
| 27 | |||
| 28 | -#ifdef HAVE_SYS_SYSCTL_H | ||
| 29 | +#if defined(HAVE_SYS_SYSCTL_H) && !defined(__GLIBC__) | ||
| 30 | #include <sys/sysctl.h> | ||
| 31 | #endif | ||
| 32 | |||
| 33 | --- a/src/memory.c | ||
| 34 | +++ b/src/memory.c | ||
| 35 | @@ -28,7 +28,7 @@ | ||
| 36 | #include "common.h" | ||
| 37 | #include "plugin.h" | ||
| 38 | |||
| 39 | -#ifdef HAVE_SYS_SYSCTL_H | ||
| 40 | +#if defined(HAVE_SYS_SYSCTL_H) && !defined(__GLIBC__) | ||
| 41 | #include <sys/sysctl.h> | ||
| 42 | #endif | ||
| 43 | #ifdef HAVE_SYS_VMMETER_H | ||
| 44 | --- a/src/swap.c | ||
| 45 | +++ b/src/swap.c | ||
| 46 | @@ -49,7 +49,7 @@ | ||
| 47 | #if HAVE_SYS_PARAM_H | ||
| 48 | #include <sys/param.h> | ||
| 49 | #endif | ||
| 50 | -#if HAVE_SYS_SYSCTL_H | ||
| 51 | +#if defined(HAVE_SYS_SYSCTL_H) && !defined(__GLIBC__) | ||
| 52 | #include <sys/sysctl.h> | ||
| 53 | #endif | ||
| 54 | #if HAVE_SYS_DKSTAT_H | ||
| 55 | --- a/src/uuid.c | ||
| 56 | +++ b/src/uuid.c | ||
| 57 | @@ -29,7 +29,7 @@ | ||
| 58 | #include "common.h" | ||
| 59 | #include "plugin.h" | ||
| 60 | |||
| 61 | -#if HAVE_SYS_SYSCTL_H | ||
| 62 | +#if defined(HAVE_SYS_SYSCTL_H) && !defined(__GLIBC__) | ||
| 63 | #include <sys/sysctl.h> | ||
| 64 | #endif | ||
| 65 | |||
| 66 | --- a/src/cpu.c | ||
| 67 | +++ b/src/cpu.c | ||
| 68 | @@ -60,7 +60,7 @@ | ||
| 69 | |||
| 70 | #if (defined(HAVE_SYSCTL) && HAVE_SYSCTL) || \ | ||
| 71 | (defined(HAVE_SYSCTLBYNAME) && HAVE_SYSCTLBYNAME) | ||
| 72 | -#ifdef HAVE_SYS_SYSCTL_H | ||
| 73 | +#if defined(HAVE_SYS_SYSCTL_H) && !defined(__GLIBC__) | ||
| 74 | #include <sys/sysctl.h> | ||
| 75 | #endif | ||
| 76 | |||
| 77 | --- a/src/processes.c | ||
| 78 | +++ b/src/processes.c | ||
| 79 | @@ -82,7 +82,7 @@ | ||
| 80 | #if HAVE_MACH_VM_PROT_H | ||
| 81 | #include <mach/vm_prot.h> | ||
| 82 | #endif | ||
| 83 | -#if HAVE_SYS_SYSCTL_H | ||
| 84 | +#if defined(HAVE_SYS_SYSCTL_H) && !defined(__GLIBC__) | ||
| 85 | #include <sys/sysctl.h> | ||
| 86 | #endif | ||
| 87 | /* #endif HAVE_THREAD_INFO */ | ||
| 88 | --- a/src/uptime.c | ||
| 89 | +++ b/src/uptime.c | ||
| 90 | @@ -33,7 +33,7 @@ | ||
| 91 | */ | ||
| 92 | /* #endif HAVE_LIBKSTAT */ | ||
| 93 | |||
| 94 | -#elif HAVE_SYS_SYSCTL_H | ||
| 95 | +#elif defined(HAVE_SYS_SYSCTL_H) && !defined(__GLIBC__) | ||
| 96 | #include <sys/sysctl.h> | ||
| 97 | /* Using sysctl interface to retrieve the boot time on *BSD / Darwin / OS X | ||
| 98 | * 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 6dff18c16b..0951ac076f 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 \ | |||
| 14 | file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \ | 14 | file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \ |
| 15 | file://0005-Disable-new-gcc8-warnings.patch \ | 15 | file://0005-Disable-new-gcc8-warnings.patch \ |
| 16 | file://0006-libcollectdclient-Fix-string-overflow-errors.patch \ | 16 | file://0006-libcollectdclient-Fix-string-overflow-errors.patch \ |
| 17 | file://0001-Remove-including-sys-sysctl.h-on-glibc-based-systems.patch \ | ||
| 17 | " | 18 | " |
| 18 | SRC_URI[md5sum] = "bfce96c42cede5243028510bcc57c1e6" | 19 | SRC_URI[md5sum] = "bfce96c42cede5243028510bcc57c1e6" |
| 19 | SRC_URI[sha256sum] = "e796fda27ce06377f491ad91aa286962a68c2b54076aa77a29673d53204453da" | 20 | SRC_URI[sha256sum] = "e796fda27ce06377f491ad91aa286962a68c2b54076aa77a29673d53204453da" |
