Package: socat
Version: 1.7.3.2-1
Severity: normal
Tags: patch

Dear Maintainer,

It seems socat fails to build on hurd. This in turn affects util-linux
which has a build-dependency on socat for tests. Rather than excluding
socat specifically on hurd, I think it would be better to have socat
building.

Not a hurd expert myself so took the simplest possible way forward
in the attached patch which I've confirmed to build on the hurd
porterbox. Hopefully an actual hurd porter can improve on it if needed
(and actually runtime test the results).  See also comments in patch
header.

Regards,
Andreas Henriksson

Subject: Have compat.h define PATH_MAX if undefined
From: Andreas Henriksson <andr...@fatal.se>

This solves the build problem on Hurd. Not sure if this approach,
replacing all PATH_MAX usages with UNIX_PATH_MAX is better.
Or even if it would be possible to rewrite all users of both of
them to not rely on PATH_MAX at all. Oh well, this builds...
(no other testing done.)

https://buildd.debian.org/status/fetch.php?pkg=socat&arch=hurd-i386&ver=1.7.3.2-1&stamp=1499666768&raw=0

--- socat-1.7.3.2.orig/compat.h
+++ socat-1.7.3.2/compat.h
@@ -72,6 +72,10 @@ typedef int sig_atomic_t;
 #  define UNIX_PATH_MAX 104	/*! why 104? Linux: 108 ! */
 #endif
 
+/* PATH_MAX is not define on Hurd. */
+#ifndef PATH_MAX
+#  define PATH_MAX UNIX_PATH_MAX
+#endif
 
 /* SOL_IP: AIX 4.3.3 */
 #ifndef SOL_IP

Reply via email to