--- a/misc.cc
+++ b/misc.cc
@@ -25,6 +25,9 @@
 #include <netinet/in.h>
 #include <unistd.h>
 #endif // WIN32
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 255
+#endif
 
 #include "misc.hh"
 #include <vector>
--- a/Makefile
+++ b/Makefile
@@ -33,6 +33,9 @@
 ifeq ($(shell uname),GNU/kFreeBSD)
 	-include sysdeps/FreeBSD.inc
 endif
+ifeq ($(shell uname),GNU/Hurd)
+	-include sysdeps/Linux.inc
+endif
 
 ifeq ($(LUA), 1)
 	LUALIBS=$(LUA_LIBS_CONFIG)
