John Crispin <[email protected]> writes:
> none of the buildservers seem to break without this patch. please
> repost explaining how the build breaks without this patch. also
> reference the place where you copied the patch from
The buildservers probably don't build this file since
CONFIG_PCAP_HAS_USB is 'n' by default?
Building on current master with
bjorn@canardo:/usr/local/src/lede$ grep PCAP .config
CONFIG_PCAP_HAS_USB=y
CONFIG_PCAP_HAS_NETFILTER=y
results in:
bjorn@canardo:/usr/local/src/lede$ make V=s package/libpcap/compile
..
arm-openwrt-linux-muslgnueabi-gcc -Os -pipe -mcpu=cortex-a9 -mfpu=vfpv3-d16
-fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable
-Wno-error=unused-result -mfloat-abi=hard
-iremap/mnt/storage/media/.diverse/src/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/libpcap-1.9.0:libpcap-1.9.0
-Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1
-Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections
-I/mnt/storage/media/.diverse/src/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux/include
-fpic -I. -DBUILDING_PCAP -D_BSD_SOURCE -Dpcap_EXPORTS -DHAVE_CONFIG_H -Os
-pipe -mcpu=cortex-a9 -mfpu=vfpv3-d16 -fno-caller-saves -fno-plt -fhonour-copts
-Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard
-iremap/mnt/storage/media/.diverse/src/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/libpcap-1.9.0:libpcap-1.9.0
-Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1
-Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections -c -o
pcap-usb-linux.o ./pcap-usb-linux.c
./pcap-usb-linux.c: In function 'usb_findalldevs':
./pcap-usb-linux.c:264:19: error: 'PATH_MAX' undeclared (first use in this
function); did you mean 'AF_MAX'?
char usb_mon_dir[PATH_MAX];
^~~~~~~~
AF_MAX
./pcap-usb-linux.c:264:19: note: each undeclared identifier is reported only
once for each function it appears in
./pcap-usb-linux.c: In function 'probe_devices':
./pcap-usb-linux.c:419:41: error: 'NAME_MAX' undeclared (first use in this
function); did you mean 'AF_MAX'?
char buf[sizeof("/dev/bus/usb/000/") + NAME_MAX];
^~~~~~~~
AF_MAX
Makefile:94: recipe for target 'pcap-usb-linux.o' failed
make[3]: *** [pcap-usb-linux.o] Error 1
make[3]: Leaving directory
'/home/bjorn/tmp/tmp-lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/libpcap-1.9.0'
Makefile:101: recipe for target
'/mnt/storage/media/.diverse/src/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/libpcap-1.9.0/.built'
failed
make[2]: ***
[/mnt/storage/media/.diverse/src/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/libpcap-1.9.0/.built]
Error 2
make[2]: Leaving directory
'/mnt/storage/media/.diverse/src/lede/package/libs/libpcap'
Command exited with non-zero status 2
time: package/libs/libpcap/compile#2.20#0.39#6.47
package/Makefile:107: recipe for target 'package/libs/libpcap/compile' failed
make[1]: *** [package/libs/libpcap/compile] Error 2
make[1]: Leaving directory '/mnt/storage/media/.diverse/src/lede'
/mnt/storage/media/.diverse/src/lede/include/toplevel.mk:216: recipe for target
'package/libpcap/compile' failed
make: *** [package/libpcap/compile] Error 2
Patch looks good to me.
Bjørn
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel