Drop OpenSSL 3 patch accepted upstream Fix compilation failure on 32 bit architectures Do not hardcode error numbers Fix build failure on platforms where char is unsigned
44 lines
1.4 KiB
Diff
44 lines
1.4 KiB
Diff
From 0b185f6ee52096929ff58ef6fa94a53d2babc1f8 Mon Sep 17 00:00:00 2001
|
|
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
|
Date: Wed, 27 Oct 2021 22:42:18 +0200
|
|
Subject: [PATCH] Do not hardcode error numbers
|
|
|
|
The error numbers defined on Linux can not be reused on other systems
|
|
since this causes clashes.
|
|
|
|
On Linux ECHRNG is 44, but defining ECHRNG to be 44 on systems that do
|
|
not define ECHRNG is not appropriate. On e.g. kFreeBSD this will clash
|
|
with ESOCKTNOSUPPORT, which is defined as 44 on that system.
|
|
---
|
|
src/XrdPosix/XrdPosixMap.cc | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/src/XrdPosix/XrdPosixMap.cc b/src/XrdPosix/XrdPosixMap.cc
|
|
index 23075e0a5..a5a06230a 100644
|
|
--- a/src/XrdPosix/XrdPosixMap.cc
|
|
+++ b/src/XrdPosix/XrdPosixMap.cc
|
|
@@ -44,6 +44,10 @@
|
|
#define ENOSR ENOSPC
|
|
#endif
|
|
|
|
+#ifndef ECHRNG
|
|
+#define ECHRNG EINVAL
|
|
+#endif
|
|
+
|
|
/******************************************************************************/
|
|
/* S t a t i c M e m b e r s */
|
|
/******************************************************************************/
|
|
@@ -80,10 +84,6 @@ mode_t XrdPosixMap::Flags2Mode(dev_t *rdv, uint32_t flags)
|
|
/* Private: m a p C o d e */
|
|
/******************************************************************************/
|
|
|
|
-#ifndef ECHRNG
|
|
-#define ECHRNG 44
|
|
-#endif
|
|
-
|
|
int XrdPosixMap::mapCode(int rc)
|
|
{
|
|
switch(rc)
|
|
--
|
|
2.31.1
|
|
|