Should test for gethost*by*name_r, not for gethostname_r (which
doesn't exist and doesn't make sense).
diff --git a/configure.in b/configure.in
index e5adc5a..5834bc6 100644
--- a/configure.in
+++ b/configure.in
@@ -663,7 +663,7 @@
 # checks for library functions
 AC_CHECK_FUNCS(alarm chown clock dlopen execv flock fork \
  fsync fdatasync ftime ftruncate \
- gethostname_r getpeername getpgrp getpid getpwent gettimeofday getwd \
+ gethostbyname_r getpeername getpgrp getpid getpwent gettimeofday getwd \
  kill link lstat mkfifo mktime nice pause plock pthread_init putenv readlink \
  select setgid setlocale setuid setsid setpgid setpgrp setvbuf \
  sigaction siginterrupt sigrelse strftime strptime symlink \