compilations fails on (Debian) GNU/Hurd. There is 2 problems :
- PATH_MAX is not defined (PATH_MAX "seems to not be POSIX", that's why it's not present on Hurd)
- UIO_MAXIOV nor IOV_MAX are not defined, but writev is defined (workaround is to define a value for UIO_MAXIOV)
and :
- GNU/hurd defines sendfile() with the same signature as on Linux, maybe it can be used too.
here is a patch which make lighttpd work on GNU/Hurd:
diff -Naur lighttpd-1.4.10.orig/src/configfile.c lighttpd-1.4.10/src/configfile.c
--- lighttpd-1.4.10.orig/src/configfile.c 2006-02-08 13:39:29.000000000 +0100
+++ lighttpd-1.4.10/src/configfile.c 2006-03-15 15:32:12.000000000 +0100
@@ -863,8 +863,12 @@
int ret;
buffer *source;
buffer *out;
+#ifdef PATH_MAX
char oldpwd[PATH_MAX];
-
+#else
+ char oldpwd[4096];
+#endif
+
if (NULL == getcwd(oldpwd, sizeof(oldpwd))) {
log_error_write(srv, __FILE__, __LINE__, "s",
"cannot get cwd", strerror(errno));
diff -Naur lighttpd-1.4.10.orig/src/network_writev.c lighttpd-1.4.10/src/network_writev.c
--- lighttpd-1.4.10.orig/src/network_writev.c 2006-02-01 12:37:29.000000000 +0100
+++ lighttpd-1.4.10/src/network_writev.c 2006-03-15 15:32:58.000000000 +0100
@@ -42,6 +42,9 @@
# endif
# elif defined(IOV_MAX)
# define UIO_MAXIOV IOV_MAX
+# elif defined(__GNU__)
+/* GNU/hurd doesn't define UIO_MAXIOV nor IOV_MAX then falling back to an usable value */
+# define UIO_MAXIOV 16
# else
# error UIO_MAXIOV nor IOV_MAX are defined
# endif
thx