lancethepants / tomatoware

Tomatoware is a set of scripts to create a native development environment for tomato firmware supported routers.
Other
71 stars 22 forks source link

compile MTR error #31

Closed houzi- closed 8 years ago

houzi- commented 8 years ago

I do not know too new toolchain or dynamic dependency file causes a compilation error! Can you help me?

gcc  -g -O2 -Wall -Wno-pointer-sign  curses.o  -o mtr mtr.o net.o dns.o raw.o split.o display.o report.o getopt.o getopt1.o select.o asn.o    -lm -lncurses 
dns.o: In function `dorequest':
/mmc/compile/mtr/dns.c:926: undefined reference to `res_nmkquery'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:475: mtr] Error 1
make[2]: Leaving directory '/mmc/compile/mtr'
make[1]: *** [Makefile:561: all-recursive] Error 1
make[1]: Leaving directory '/mmc/compile/mtr'
make: *** [Makefile:376: all] Error 2
lancethepants commented 8 years ago

diff -Nuar mtr-0.86_orig/dns.c mtr-0.86/dns.c --- mtr-0.86_orig/dns.c 2016-07-20 07:30:11.694718001 -0600 +++ mtr-0.86/dns.c 2016-07-20 07:30:23.334718001 -0600 @@ -320,7 +320,7 @@

int use_dns = 1;

-#ifdef res_ninit +#ifndef res_ninit

define MY_RES_INIT() res_ninit(&myres);

define RES_MKQUERY(a, b, c, d, e, f, g, h, i) \

 res_nmkquery(&myres, a, b, c, d, e, f, g, h, i)
houzi- commented 8 years ago

Thanks!