diff --git a/src/include/config.h.in b/src/include/config.h.in
index 9c0326485f4a180fb99d666ae57eea58bc82ad4f..00db98f1abcfe1995156e125451e31db1df0c729 100644
--- a/src/include/config.h.in
+++ b/src/include/config.h.in
@@ -58,7 +58,7 @@
 
 /* Set to 1 if you have gethostname() */
 #undef HAVE_GETHOSTNAME
-#ifndef GETHOSTNAME
+#ifndef HAVE_GETHOSTNAME
 extern int  gethostname(char *name, int namelen);
 #endif