Blob Blame History Raw
From 6a381c776976c21161fa279c75b6fa2c0ce4774f Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Tue, 31 Oct 2023 18:17:23 +0100
Subject: [PATCH 3/3] Don't try to enable TCP_CORK in GNU/Hurd

The "man tcp" says about TCP_CORK: "This option should not be used in
code intended to be portable". So, it should not be expected to be
working everywhere.

The failure below is from Debian GNU/Hurd:

test 22
      Start 22: XRootD::smoke-test

22: Test command: /usr/bin/sh "-c" "/<<PKGBUILDDIR>>/tests/XRootD/smoke.sh"
22: Working Directory: /<<PKGBUILDDIR>>/obj-i686-gnu/tests/XRootD
22: Environment variables:
22:  XRDCP=/<<PKGBUILDDIR>>/obj-i686-gnu/src/XrdCl/xrdcp
22:  XRDFS=/<<PKGBUILDDIR>>/obj-i686-gnu/src/XrdCl/xrdfs
22:  CRC32C=/<<PKGBUILDDIR>>/obj-i686-gnu/src/xrdcrc32c
22:  ADLER32=/<<PKGBUILDDIR>>/obj-i686-gnu/src/xrdadler32
22:  HOST=root://localhost:10940
22: Test timeout computed to be: 10000000
22: Using /usr/bin/openssl: OpenSSL 3.0.12 24 Oct 2023 (Library: OpenSSL 3.0.12 24 Oct 2023)
22: v5.6.3
22: Using /<<PKGBUILDDIR>>/obj-i686-gnu/src/XrdCl/xrdcp:
22: [FATAL] Socket opt error: no message of desired type
21/22 Test #22: XRootD::smoke-test ........................................................***Failed    0.13 sec
Using /usr/bin/openssl: OpenSSL 3.0.12 24 Oct 2023 (Library: OpenSSL 3.0.12 24 Oct 2023)
v5.6.3
Using /<<PKGBUILDDIR>>/obj-i686-gnu/src/XrdCl/xrdcp:
[FATAL] Socket opt error: no message of desired type
---
 src/XrdCl/XrdClSocket.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/XrdCl/XrdClSocket.cc b/src/XrdCl/XrdClSocket.cc
index a94eb4b48..a2cb47c12 100644
--- a/src/XrdCl/XrdClSocket.cc
+++ b/src/XrdCl/XrdClSocket.cc
@@ -781,7 +781,8 @@ namespace XrdCl
   //------------------------------------------------------------------------
   XRootDStatus Socket::Cork()
   {
-#if defined(TCP_CORK) // it's not defined on mac, we might want explore the possibility of using TCP_NOPUSH
+#if defined(TCP_CORK) && !defined(__GNU__)
+    // it's not defined on mac, we might want explore the possibility of using TCP_NOPUSH
     if( pCorked ) return XRootDStatus();
 
     int state = 1;
@@ -798,7 +799,8 @@ namespace XrdCl
   //------------------------------------------------------------------------
   XRootDStatus Socket::Uncork()
   {
-#if defined(TCP_CORK) // it's not defined on mac, we might want explore the possibility of using TCP_NOPUSH
+#if defined(TCP_CORK) && !defined(__GNU__)
+    // it's not defined on mac, we might want explore the possibility of using TCP_NOPUSH
     if( !pCorked ) return XRootDStatus();
 
     int state = 0;
-- 
2.41.0