In the source of RPM-3.0.2-6.0, these three files:
need to have this line added to them at the very top of
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.