We all had our share of undefined references with gethostbyname, socket etc ...
Most of them are linked to the network bindings and can be found in network libraries.
Check the makefile files for "LIBS= "
If you use system headers you don't have to add anything there, if not add the "LDFLAG=-L<path_to_lib>" without the quotes in LIBS=
Then add the network libs for each system like:
BeOS R5: LIBS= -lnet -lsocket
ZETA/BeOS BONE: LIBS= -lbind -lsocket
Haiku: LIBS= -lnetwork
Hope this helps you out on getting nasty defines out of the way.
