pegtl: Fix build with clang/libc++
PATCH v2 1/2 pegtl: Fix build with clang/libc++
Signed-off-by Khem Raj <[email protected]>
Cc Ayoub Zaki <[email protected]>
---
v2: Backport a patch instead of cooking one
...clang-warning-about-non-virtual-dtor.patch | 25 +++++++++++++++++++ meta-oe/recipes-extended/pegtl/pegtl_2.1.4.bb | 4 ++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-extended/pegtl/pegtl/0001-Fix-clang-warning-about-non-virtual-dtor.patch
meta-oe/recipes-extended/pegtl/pegtl/0001-Fix-clang-warning-about-non-virtual-dtor.patch new file +25 -0
@@ -0,0 +1,25 @@ +From 340110292b35d367205953a59e7eab28e1f4a0bb Mon Sep 17 00:00:00 2001 +From: Daniel Frey <[email protected]> +Date: Sat, 7 Apr 2018 09:13:51 +0200 +Subject: [PATCH] Fix clang-warning about non-virtual dtor + +Upstream-Status: Backport [https://github.com/taocpp/PEGTL/commit/340110292b35d367205953a59e7eab28e1f4a0bb] +Signed-off-by: Khem Raj <[email protected]> +--- + src/example/pegtl/json_classes.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/src/example/pegtl/json_classes.hpp ++++ b/src/example/pegtl/json_classes.hpp +@@ -34,10 +34,7 @@ namespace examples + : type( in_type ) + { + } +- +- ~json_base() +- { +- } ++ virtual ~json_base() = default; + }; + + inline std::ostream& operator<<( std::ostream& o, const json_base& j )
meta-oe/recipes-extended/pegtl/pegtl_2.1.4.bb +3 -1
@@ -4,7 +4,9 @@ LICENSE="MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=80cb066ab204c7fe022f1cfe0c2c6818" SRCREV = "776fa4a1e8bda860008524f6dd9473967c8375b1" -SRC_URI = "git://[email protected]/taocpp/PEGTL.git;protocol=https;branch=master" +SRC_URI = "git://[email protected]/taocpp/PEGTL.git;protocol=https;branch=master \ + file://0001-Fix-clang-warning-about-non-virtual-dtor.patch \ + " inherit cmake
Signature · 1 line
2.22.0
PATCH v2 2/2 collectd: Fix build with glibc 2.30
Signed-off-by Khem Raj <[email protected]>
---
v2: Apply the fix just for glibc based systems
...-sys-sysctl.h-on-glibc-based-systems.patch | 76 +++++++++++++++++++ .../collectd/collectd_5.8.1.bb | 1 + 2 files changed, 77 insertions(+) create mode 100644 meta-oe/recipes-extended/collectd/collectd/0001-Remove-including-sys-sysctl.h-on-glibc-based-systems.patch
meta-oe/recipes-extended/collectd/collectd/0001-Remove-including-sys-sysctl.h-on-glibc-based-systems.patch new file +76 -0
@@ -0,0 +1,76 @@ +From 090a17ca338a9311d682ecc5933b32bff67cf07f Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +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 <[email protected]> +--- + src/contextswitch.c | 2 +- + src/memory.c | 2 +- + src/swap.c | 2 +- + src/uuid.c | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/contextswitch.c b/src/contextswitch.c +index cf3d3dae..4711e66d 100644 +--- a/src/contextswitch.c ++++ b/src/contextswitch.c +@@ -26,7 +26,7 @@ + #include "plugin.h" + #include "utils/common/common.h" + +-#ifdef HAVE_SYS_SYSCTL_H ++#if defined(HAVE_SYS_SYSCTL_H) && !defined(__GLIBC__) + #include <sys/sysctl.h> + #endif + +diff --git a/src/memory.c b/src/memory.c +index 10bccdee..50a80868 100644 +--- a/src/memory.c ++++ b/src/memory.c +@@ -28,7 +28,7 @@ + #include "plugin.h" + #include "utils/common/common.h" + +-#ifdef HAVE_SYS_SYSCTL_H ++#if defined(HAVE_SYS_SYSCTL_H) && !defined(__GLIBC__) + #include <sys/sysctl.h> + #endif + #ifdef HAVE_SYS_VMMETER_H +diff --git a/src/swap.c b/src/swap.c +index 61c9e284..5a475e4f 100644 +--- 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 +diff --git a/src/uuid.c b/src/uuid.c +index 60d09b51..17e4dd81 100644 +--- a/src/uuid.c ++++ b/src/uuid.c +@@ -29,7 +29,7 @@ + #include "plugin.h" + #include "utils/common/common.h" + +-#if HAVE_SYS_SYSCTL_H ++#if defined(HAVE_SYS_SYSCTL_H) && !defined(__GLIBC__) + #include <sys/sysctl.h> + #endif + +-- +2.22.0 +
meta-oe/recipes-extended/collectd/collectd_5.8.1.bb +1 -0
@@ -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"
Signature · 1 line
2.22.0