unix网络编程卷1笔记
http://bbs.chinaunix.net/archiver/tid-505577.html
和http://chenliang.info/?p=224
cd unpv12e
./configure
make
vim README看怎么安装
cd unpv12e/lib
make会报错unp.h:114: error: redefinition of ‘struct in_pktin
unp.h中,这段代码注释掉,因为在linux系统include文件中已经定义了这个结构,
/* The structure returned by recvfrom_flags() */struct in_pktinfo { struct in_addr ipi_addr; /* dst IPv4 address */ int ipi_ifindex; /* received interface index */};apple:libfree apple$ makegcc -I../lib -g -O2 -D_REENTRANT -Wall -c -o in_cksum.o in_cksum.cgcc -I../lib -g -O2 -D_REENTRANT -Wall -c -o inet_ntop.o inet_ntop.cinet_ntop.c: In function ‘inet_ntop’:inet_ntop.c:61: error: argument ‘size’ doesn’t match prototype/usr/include/arpa/inet.h:99: error: prototype declarationmake: *** [inet_ntop.o] Error 1apple:libfree apple$