diff options
author | chenheyun <chen_heyun@163.com> | 2024-02-18 05:47:08 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-02-18 07:16:29 -0800 |
commit | 2a7f74cdb037cb7917bdf6453db9ddd66191a14a (patch) | |
tree | 35cd445dfda057ed2255489d07a07ab07d5cfef8 /meta-networking/recipes-support | |
parent | 2bbdb9c22db5e7c68561582bb75f4e70ec1b39bb (diff) | |
download | meta-openembedded-contrib-2a7f74cdb037cb7917bdf6453db9ddd66191a14a.tar.gz |
dropwatch: Use header files from sysroot instead of build host
it does not match with our real head file form kernel.(net_dropmon.h)
net_dropmon.h in dropwatch local src/net_dropmon.h.
linux kernel also have it in include/uapi/linux/net_dropmon.h
for example,our kernel is linux5.10:
diff tmp/work/cortexa57-poky-linux/dropwatch/1.5.4+git-r0/recipe-sysroot/usr/
include/linux/net_dropmon.h tmp/work/cortexa57-poky-linux/dropwatch/1.5.4+git-r0/git/src/net_dropmon.h
1c1,3
<
95a94
> NET_DM_ATTR_REASON, /* string */
it will cause mismatch when we use dropwatch in older kernel version(v5.10),
will cause dropwatch and kernel drop_monitor module mismatch with netlink talk.
we should build it with header from sysroot which comes from matching
kernel.
Signed-off-by: chenheyun <chen_heyun@163.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-support')
-rwxr-xr-x | meta-networking/recipes-support/dropwatch/dropwatch/0001-fix-bug-build-with-sysroot-head-file-instead-of-loca.patch | 28 | ||||
-rw-r--r-- | meta-networking/recipes-support/dropwatch/dropwatch_1.5.4.bb | 4 |
2 files changed, 31 insertions, 1 deletions
diff --git a/meta-networking/recipes-support/dropwatch/dropwatch/0001-fix-bug-build-with-sysroot-head-file-instead-of-loca.patch b/meta-networking/recipes-support/dropwatch/dropwatch/0001-fix-bug-build-with-sysroot-head-file-instead-of-loca.patch new file mode 100755 index 0000000000..33b72e05f0 --- /dev/null +++ b/meta-networking/recipes-support/dropwatch/dropwatch/0001-fix-bug-build-with-sysroot-head-file-instead-of-loca.patch @@ -0,0 +1,28 @@ +From 4872c52f55f9cb089e6681c3f1926663145b52ae Mon Sep 17 00:00:00 2001 +From: chenheyun <chen_heyun@163.com> +Date: Sun, 18 Feb 2024 05:08:25 -0800 +Subject: [PATCH] fix bug: build with sysroot head file instead of local head + file:net_dropmon.h + +Signed-off-by: chenheyun <chen_heyun@163.com> +--- + src/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/main.c b/src/main.c +index e4746d9..81dc4da 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -26,8 +26,8 @@ + #include <netlink/netlink.h> + #include <netlink/genl/genl.h> + #include <netlink/genl/ctrl.h> ++#include <net_dropmon.h> + +-#include "net_dropmon.h" + #include "lookup.h" + + /* +-- +2.25.1 + diff --git a/meta-networking/recipes-support/dropwatch/dropwatch_1.5.4.bb b/meta-networking/recipes-support/dropwatch/dropwatch_1.5.4.bb index e3dbac4a26..baa9398a18 100644 --- a/meta-networking/recipes-support/dropwatch/dropwatch_1.5.4.bb +++ b/meta-networking/recipes-support/dropwatch/dropwatch_1.5.4.bb @@ -8,7 +8,9 @@ SECTION = "net/misc" LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" -SRC_URI = "git://github.com/nhorman/dropwatch.git;protocol=https;nobranch=1" +SRC_URI = "git://github.com/nhorman/dropwatch.git;protocol=https;nobranch=1 \ + file://0001-fix-bug-build-with-sysroot-head-file-instead-of-loca.patch \ +" SRCREV = "1e7e487a019a7c02f1f429c4d3a4647fa3787a13" S = "${WORKDIR}/git" |