In the source of RPM-3.0.2-6.0, these three files: build/names.c lib/ftp.c url.c need to have this line added to them at the very top of each file: #include <netdb.h> netdb.h is needed for the hostent structs and the gethostbyname function. (as well as a few other things)
Those *.c files all include system.h which includes netdb.h.