我在我的 linux 系统上安装了 pcap 库,但是在包含它时出现错误
/usr/include/pcap/bpf.h:88:1: error: unknown type name ‘u_int’
/usr/include/pcap/bpf.h:108:2: error: unknown type name ‘u_int’
/usr/include/pcap/bpf.h:1260:2: error: unknown type name ‘u_short’
/usr/include/pcap/bpf.h:1261:2: error: unknown type name ‘u_char’
/usr/include/pcap/bpf.h:1262:2: error: unknown type name ‘u_char’
In file included from ../src/test.c:1:0:
/usr/include/pcap/pcap.h:125:2: error: unknown type name ‘u_short’
/usr/include/pcap/pcap.h:126:2: error: unknown type name ‘u_short’
/usr/include/pcap/pcap.h:171:2: error: unknown type name ‘u_int’
...
make: *** [src/test.o] Error 1
包括我
#include <pcap/pcap.h>
#include <sys/types.h>
#include <pcap-bpf.h>
在程序中,我错过了什么?