1.unp.h在Stevens提供的源码包的lib目录中 2.生成config.h方法: autoscan mv configure.scan configure.in aclocal autoconf autoheader ./configure unp.改一下config.h的位置,去掉addrinfo.h的包含 config.h中加入 #define HAVE_STRUCT_SOCKADDR_STORAGE 1 #define HAVE_ADDRINFO_STRUCT 1 #define HAVE_TIMESPEC_STRUCT 1 #define HAVE_GETADDRINFO_PROTO 1 #define HAVE_GETNAMEINFO_PROTO 1 #define HAVE_GETHOSTNAME_PROTO 1 a.out *.*.*.* 可用NTP时间服务器: 192.43.244.18, 54424 07-11-20 15:01:37 00 0 0 0.0 UTC(NIST) * 164.67.62.194(相当快) 20 NOV 2007 07:07:06 PST
开始学UNIX网络编程了,这是我的第一个网络程序:-)要纪念一下
最新推荐文章于 2024-07-19 16:09:28 发布