patches for NetBSD

The attached patches fix several issues on NetBSD:

  • The cpp conditionals for mmap goo in syscall.c don't match and break on NetBSD.
  • NetBSD <7 incorrectly declared the obsolete gethostbyaddr function to take char * rather than void *.
  • In NetBSD >=4, the ELF symbol for the socket routine in libc is named __socket30; the symbol named socket is a compatibility routine implementing older semantics in terms of the symbol __socket30.