diff options
author | Kai Kang <kai.kang@windriver.com> | 2024-06-08 20:35:10 +0800 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2024-06-24 07:36:08 -0400 |
commit | 18120281191d21727d726e4555666a5e89d2f937 (patch) | |
tree | 374f22b67f9193396f8a84c7f07bcfbd4dc273a2 | |
parent | ecba4318342f334a25ce404e2d96f8664a36ae46 (diff) | |
download | meta-openembedded-18120281191d21727d726e4555666a5e89d2f937.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>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | meta-networking/recipes-connectivity/daq/daq_2.0.7.bb | 1 | ||||
-rw-r--r-- | meta-networking/recipes-connectivity/daq/files/daq-fix-incompatible-pointer-type-error.patch | 31 |
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 66ad83f711..8cb4c04fa3 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" | |||
11 | SRC_URI = "http://fossies.org/linux/misc/daq-${PV}.tar.gz \ | 11 | SRC_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 | " |
15 | SRC_URI[sha256sum] = "bdc4e5a24d1ea492c39ee213a63c55466a2e8114b6a9abed609927ae13a7705e" | 16 | SRC_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 0000000000..ade3ec686b --- /dev/null +++ b/meta-networking/recipes-connectivity/daq/files/daq-fix-incompatible-pointer-type-error.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | Fix 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 | |||
12 | Upstream-Status: Inactive-Upstream [lastrelease: 2019-03-09] | ||
13 | |||
14 | Signed-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 | |||
19 | diff --git a/os-daq-modules/daq_nfq.c b/os-daq-modules/daq_nfq.c | ||
20 | index 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; | ||