[PATCH v2 0/1] libpcap: patch to add limits.h to pcap-usb-linux.c

Eneas U de Queiroz cote2004-github at yahoo.com
Wed Aug 1 05:48:41 PDT 2018


This patch, taken from
https://github.com/the-tcpdump-group/libpcap/commit/aafa351
fixes compilation with CONFIG_PCAP_HAS_USB set on musl.

./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
make[3]: *** [Makefile:95: pcap-usb-linux.o] Error 1

Eneas U de Queiroz (1):
  libpcap: patch to add limits.h to pcap-usb-linux.c

 ...205-pcap-usb-linux.c-add-missing-limits.h.patch | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 package/libs/libpcap/patches/205-pcap-usb-linux.c-add-missing-limits.h.patch

-- 
2.16.4




More information about the openwrt-devel mailing list