The SUSv3 says ntoh* and hton* are declared in <arpa/inet.h> and, on HP-UX 10.20, by default you have to include <arpa/inet.h> to get them defined.