shadowsocks / ChinaDNS

Protect yourself against DNS poisoning in China.
GNU General Public License v3.0
3.59k stars 1.29k forks source link

ChinaDNS编译问题 #117

Closed Eveink closed 9 years ago

Eveink commented 9 years ago

root@debian:~/ChinaDNS# make make all-recursive make[1]: Entering directory /root/ChinaDNS' Making all in src make[2]: Entering directory/root/ChinaDNS/src' arm-linux-musleabi-gcc -I/arm-linux-musleabi/include/ -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT local_ns_parser.o -MD -MP -MF .deps/local_ns_parser.Tpo -c -o local_ns_parser.o local_ns_parser.c local_ns_parser.c: In function 'local_ns_initparse': local_ns_parser.c:47:27: error: 'NULL' undeclared (first use in this function) handle->_sections[i] = NULL; ^ local_ns_parser.c:47:27: note: each undeclared identifier is reported only once for each function it appears in local_ns_parser.c: In function 'local_ns_parserr': local_ns_parser.c:115:15: error: 'NULL' undeclared (first use in this function) rr->rdata = NULL; ^ local_ns_parser.c: In function 'local_ns_setsection': local_ns_parser.c:140:27: error: 'NULL' undeclared (first use in this function) msg->LOCAL_NS_MSG_PTR = NULL; ^ make[2]: * [local_ns_parser.o] Error 1 make[2]: Leaving directory `/root/ChinaDNS/src' make[1]: * [all-recursive] Error 1 make[1]: Leaving directory`/root/ChinaDNS' make: *\ [all] Error 2

解决办法 编辑local_ns_parser.c 第4行位置写入

define NULL 0