mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-05-09 17:59:26 +00:00
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>
This commit is contained in:
@@ -11,6 +11,7 @@ DEPENDS = "libpcap libpcre libdnet bison-native libnetfilter-queue"
|
|||||||
SRC_URI = "http://fossies.org/linux/misc/daq-${PV}.tar.gz \
|
SRC_URI = "http://fossies.org/linux/misc/daq-${PV}.tar.gz \
|
||||||
file://disable-run-test-program-while-cross-compiling.patch \
|
file://disable-run-test-program-while-cross-compiling.patch \
|
||||||
file://0001-correct-the-location-of-unistd.h.patch \
|
file://0001-correct-the-location-of-unistd.h.patch \
|
||||||
|
file://daq-fix-incompatible-pointer-type-error.patch \
|
||||||
"
|
"
|
||||||
SRC_URI[sha256sum] = "bdc4e5a24d1ea492c39ee213a63c55466a2e8114b6a9abed609927ae13a7705e"
|
SRC_URI[sha256sum] = "bdc4e5a24d1ea492c39ee213a63c55466a2e8114b6a9abed609927ae13a7705e"
|
||||||
# these 2 create undeclared dependency on libdnet and libnetfilter-queue from meta-networking
|
# these 2 create undeclared dependency on libdnet and libnetfilter-queue from meta-networking
|
||||||
|
|||||||
+31
@@ -0,0 +1,31 @@
|
|||||||
|
Fix daq incompatible pointer type error when gcc option
|
||||||
|
'-Wincompatible-pointer-types is set:
|
||||||
|
|
||||||
|
| ../../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 **
|
||||||
|
|
||||||
|
Upstream-Status: Inactive-Upstream [lastrelease: 2019-03-09]
|
||||||
|
|
||||||
|
Signed-off-by: Kai Kang <kai.kang@windriver.com>
|
||||||
|
---
|
||||||
|
os-daq-modules/daq_nfq.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/os-daq-modules/daq_nfq.c b/os-daq-modules/daq_nfq.c
|
||||||
|
index 4de94b6..a6de2f3 100644
|
||||||
|
--- a/os-daq-modules/daq_nfq.c
|
||||||
|
+++ b/os-daq-modules/daq_nfq.c
|
||||||
|
@@ -391,7 +391,7 @@ static inline int SetPktHdr (
|
||||||
|
DAQ_PktHdr_t* hdr,
|
||||||
|
uint8_t** pkt
|
||||||
|
) {
|
||||||
|
- int len = nfq_get_payload(nfad, (char**)pkt);
|
||||||
|
+ int len = nfq_get_payload(nfad, (unsigned char**)pkt);
|
||||||
|
|
||||||
|
if ( len <= 0 )
|
||||||
|
return -1;
|
||||||
Reference in New Issue
Block a user