--- a/src/yppasswd.c
+++ b/src/yppasswd.c
@@ -45,6 +45,11 @@
 #include <rpcsvc/ypclnt.h>
 #include <rpcsvc/yppasswd.h>
 
+/* GNU Hurd */
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
 #ifndef _
 #define _(String) gettext (String)
 #endif
--- a/lib/xdrfile-test.c
+++ b/lib/xdrfile-test.c
@@ -27,6 +27,10 @@
 #include <rpcsvc/yp_prot.h>
 #include "internal.h"
 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
 #define FILE_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)
 
 static void
