summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2024-06-08 20:35:10 +0800
committerKhem Raj <raj.khem@gmail.com>2024-06-09 16:14:58 -0700
commitd0d0e6efb991c0c7e3bea85676dc7a0eb43ddc0a (patch)
tree8ba8b6536a886069c74a6808f80321317a368618 /meta-networking
parentf25f77bdf632ab0075c61b4df41a4ffd139e2787 (diff)
downloadmeta-openembedded-d0d0e6efb991c0c7e3bea85676dc7a0eb43ddc0a.tar.gz
daq: fix incompatible pointer type error
Fix incompatible pointer type error for daq: | ../../daq-2.0.7/os-daq-modules/daq_nfq.c: In function 'SetPktHdr': | ../../daq-2.0.7/os-daq-modules/daq_nfq.c:394:37: error: passing argument 2 of 'nfq_get_payload' from incompatible pointer type [-Wincompatible-pointer-types] | 394 | int len = nfq_get_payload(nfad, (char**)pkt); | | ^~~~~~~~~~~ | | | | | char ** Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-connectivity/daq/daq_2.0.7.bb1
-rw-r--r--meta-networking/recipes-connectivity/daq/files/daq-fix-incompatible-pointer-type-error.patch31
2 files changed, 32 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/daq/daq_2.0.7.bb b/meta-networking/recipes-connectivity/daq/daq_2.0.7.bb
index 66ad83f71..8cb4c04fa 100644
--- a/meta-networking/recipes-connectivity/daq/daq_2.0.7.bb
+++ b/meta-networking/recipes-connectivity/daq/daq_2.0.7.bb
@@ -11,6 +11,7 @@ DEPENDS = "libpcap libpcre libdnet bison-native libnetfilter-queue"
11SRC_URI = "http://fossies.org/linux/misc/daq-${PV}.tar.gz \ 11SRC_URI = "http://fossies.org/linux/misc/daq-${PV}.tar.gz \
12 file://disable-run-test-program-while-cross-compiling.patch \ 12 file://disable-run-test-program-while-cross-compiling.patch \
13 file://0001-correct-the-location-of-unistd.h.patch \ 13 file://0001-correct-the-location-of-unistd.h.patch \
14 file://daq-fix-incompatible-pointer-type-error.patch \
14 " 15 "
15SRC_URI[sha256sum] = "bdc4e5a24d1ea492c39ee213a63c55466a2e8114b6a9abed609927ae13a7705e" 16SRC_URI[sha256sum] = "bdc4e5a24d1ea492c39ee213a63c55466a2e8114b6a9abed609927ae13a7705e"
16# these 2 create undeclared dependency on libdnet and libnetfilter-queue from meta-networking 17# these 2 create undeclared dependency on libdnet and libnetfilter-queue from meta-networking
diff --git a/meta-networking/recipes-connectivity/daq/files/daq-fix-incompatible-pointer-type-error.patch b/meta-networking/recipes-connectivity/daq/files/daq-fix-incompatible-pointer-type-error.patch
new file mode 100644
index 000000000..ade3ec686
--- /dev/null
+++ b/meta-networking/recipes-connectivity/daq/files/daq-fix-incompatible-pointer-type-error.patch
@@ -0,0 +1,31 @@
1Fix daq incompatible pointer type error when gcc option
2'-Wincompatible-pointer-types is set:
3
4| ../../daq-2.0.7/os-daq-modules/daq_nfq.c: In function 'SetPktHdr':
5| ../../daq-2.0.7/os-daq-modules/daq_nfq.c:394:37: error: passing argument 2
6 of 'nfq_get_payload' from incompatible pointer type [-Wincompatible-pointer-types]
7| 394 | int len = nfq_get_payload(nfad, (char**)pkt);
8| | ^~~~~~~~~~~
9| | |
10| | char **
11
12Upstream-Status: Inactive-Upstream [lastrelease: 2019-03-09]
13
14Signed-off-by: Kai Kang <kai.kang@windriver.com>
15---
16 os-daq-modules/daq_nfq.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/os-daq-modules/daq_nfq.c b/os-daq-modules/daq_nfq.c
20index 4de94b6..a6de2f3 100644
21--- a/os-daq-modules/daq_nfq.c
22+++ b/os-daq-modules/daq_nfq.c
23@@ -391,7 +391,7 @@ static inline int SetPktHdr (
24 DAQ_PktHdr_t* hdr,
25 uint8_t** pkt
26 ) {
27- int len = nfq_get_payload(nfad, (char**)pkt);
28+ int len = nfq_get_payload(nfad, (unsigned char**)pkt);
29
30 if ( len <= 0 )
31 return -1;