Ok, looking at the source code in netcat.c, here's where res_init is used:
Code:
/* can *you* say "cc -yaddayadda netcat.c -lresolv -l44bsd" on SunLOSs? */
res_init();
It would appear that "res_init" (probably short for
resource
initialization) is necessary for SunOS or possibly FreeBSD. I commented out the line by changing it to:
Code:
/* can *you* say "cc -yaddayadda netcat.c -lresolv -l44bsd" on SunLOSs? */
/* res_init(); */
Running
make linux ran to completion after doing so. Essentially we're just telling the compiler to ignore that particular part of the program.
So, not being one to lightly make these kinds of changes, a google search using "netcat res_init" returns a few pages where they talk about doing exactly this. So it's a standard "fix". The developers just simply did not test the software on every platform to find this particular problem.
Welcome to your first taste of hacking
