Index: b/pdns/misc.cc
===================================================================
--- a/pdns/misc.cc
+++ b/pdns/misc.cc
@@ -391,6 +391,9 @@
 #ifdef WIN32
 # define MAXHOSTNAMELEN 1025
 #endif // WIN32
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 255
+#endif
 
   char tmp[MAXHOSTNAMELEN];
   if(gethostname(tmp, MAXHOSTNAMELEN))
