diff options
Diffstat (limited to 'meta-openembedded/meta-webserver')
-rw-r--r-- | meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata/0001-Use-explicit-typecast-to-enum-rrdset_flags.patch | 39 | ||||
-rw-r--r-- | meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata_1.34.1.bb (renamed from meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata_1.33.1.bb) | 6 |
2 files changed, 43 insertions, 2 deletions
diff --git a/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata/0001-Use-explicit-typecast-to-enum-rrdset_flags.patch b/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata/0001-Use-explicit-typecast-to-enum-rrdset_flags.patch new file mode 100644 index 0000000000..e3c7a7cd2b --- /dev/null +++ b/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata/0001-Use-explicit-typecast-to-enum-rrdset_flags.patch @@ -0,0 +1,39 @@ +From e8ec0a0f3a353a8167687a8fdb26773e45927aac Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 24 Apr 2022 09:49:12 -0700 +Subject: [PATCH] Use explicit typecast to enum rrdset_flags + +specifications say +An enumerator can be promoted to an integer value. However, +converting an integer to an enumerator requires an explicit +cast, and the results are not defined. + +Therefore The bitwise OR operation you are performing results +in an int, which you then attempt to assign to a variable of +type rrdset_flags without a cast. + +Fixes +| ml/Host.cc:167:9: error: assigning to 'RRDSET_FLAGS' (aka 'rrdset_flags') from incompatible type 'int' +| rrdset_flag_set(RS, RRDSET_FLAG_ANOMALY_DETECTION); +| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Upstream-Status: Submitted [https://github.com/netdata/netdata/pull/12750] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + database/rrd.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/database/rrd.h ++++ b/database/rrd.h +@@ -489,8 +489,8 @@ typedef enum rrdset_flags { + #define rrdset_flag_clear(st, flag) __atomic_and_fetch(&((st)->flags), ~flag, __ATOMIC_SEQ_CST) + #else + #define rrdset_flag_check(st, flag) ((st)->flags & (flag)) +-#define rrdset_flag_set(st, flag) (st)->flags |= (flag) +-#define rrdset_flag_clear(st, flag) (st)->flags &= ~(flag) ++#define rrdset_flag_set(st, flag) (st)->flags = (RRDSET_FLAGS)((st)->flags | flag) ++#define rrdset_flag_clear(st, flag) (st)->flags = (RRDSET_FLAGS)((st)->flags & ~(flag)) + #endif + #define rrdset_flag_check_noatomic(st, flag) ((st)->flags & (flag)) + diff --git a/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata_1.33.1.bb b/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata_1.34.1.bb index f575a4cbaf..b777d20897 100644 --- a/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata_1.33.1.bb +++ b/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata_1.34.1.bb @@ -7,8 +7,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=fc9b848046ef54b5eaee6071947abd24" DEPENDS += "libuv util-linux zlib" -SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BPN}-v${PV}.tar.gz" -SRC_URI[sha256sum] = "20ba8695d87187787b27128ac3aab9b09aa29ca6b508c48542e0f7d50ec9322b" +SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BPN}-v${PV}.tar.gz \ + file://0001-Use-explicit-typecast-to-enum-rrdset_flags.patch \ +" +SRC_URI[sha256sum] = "8ea0786df0e952209c14efeb02e25339a0769aa3edc029e12816b8ead24a82d7" # default netdata.conf for netdata configuration SRC_URI += "file://netdata.conf" |