Description: Build and configuration changes for Debian platforms
 * Define MAXPATHLEN, PATH_MAX, MAXHOSTNAMELEN, MAX_IOV for Hurd.
 * Disable cwd detection on FreeBSD since it requires the FreeBSD
   version of libutil.
Author: Karl Ferdinand Ebert <kfebert@gmail.com>
Author: Romain Francoise <rfrancoise@debian.org>
Bug-Debian: http://bugs.debian.org/609333
Bug-Debian: http://bugs.debian.org/631984
Forwarded: not-needed

--- a/osdep-freebsd.c
+++ b/osdep-freebsd.c
@@ -29,7 +29,9 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#if 0
 #include <libutil.h>
+#endif
 
 struct kinfo_proc	*cmp_procs(struct kinfo_proc *, struct kinfo_proc *);
 char			*osdep_get_name(int, char *);
@@ -135,6 +137,7 @@
 char *
 osdep_get_cwd(int fd)
 {
+#if 0
 	static char		 wd[PATH_MAX];
 	struct kinfo_file	*info = NULL;
 	pid_t			 pgrp;
@@ -155,6 +158,7 @@
 	}
 
 	free(info);
+#endif
 	return (NULL);
 }
 
--- a/compat.h
+++ b/compat.h
@@ -176,6 +176,22 @@
 #define TTY_NAME_MAX 32
 #endif
 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN 64
+#endif
+
+#ifndef IOV_MAX
+#define IOV_MAX	1024
+#endif
+
 #ifndef HAVE_BZERO
 #undef bzero
 #define bzero(buf, len) memset(buf, 0, len);
