Source: socat
Version: 1.7.4.3-3
Severity: important
Tags: patch
User: [email protected]
Usertags: hurd
Cc: bug-hurd
Hi,
Currently socat FTBFS on GNU/Hurd due to differing values for O_RDONLY,
O_WRONLY and O_RDWR compared to Linux systems.
The attached patch, xioinitialize.c.patch, fixes the build problem.
Unfortunately, since util-linux build-depends on socat, that package
cannot be built.
A problem is that socat depends on netstat or ip to function properly,
and is used in the tests, not being available for GNU/Hurd. So building
the package w/o tests is recommended. (No patch is attached to disable
tests in this posting).
Additionally ifconfig is needed for the tests, but probably inetutils-
ifconfig can be used as a replacement. That package just need to add a
link of /usr/bin/inetutils-ifconfig to /sbin/ifconfig.
Thanks!
--- a/xioinitialize.c 2019-04-04 10:59:55.000000000 +0200
+++ b/xioinitialize.c 2022-09-02 19:20:22.000000000 +0200
@@ -27,10 +27,15 @@
assert(sizeof(uint32_t)==4);
/* assertions regarding O_ flags - important for XIO_READABLE() etc. */
+#ifdef __GNU__
+ assert(O_RDONLY==1);
+ assert(O_WRONLY==2);
+ assert(O_RDWR==3);
+#else
assert(O_RDONLY==0);
assert(O_WRONLY==1);
assert(O_RDWR==2);
-
+#endif
assert(SHUT_RD==0);
assert(SHUT_WR==1);
assert(SHUT_RDWR==2);