File: 02_fixhurd.patch

package info (click to toggle)
gdcm 3.0.24-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,816 kB
  • sloc: cpp: 203,722; ansic: 76,471; xml: 48,131; python: 3,473; cs: 2,308; java: 1,629; lex: 1,290; sh: 334; php: 128; makefile: 97
file content (41 lines) | stat: -rw-r--r-- 1,216 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From: Mathieu Malaterre <malat@debian.org>
Date: Sat, 14 Sep 2024 10:59:43 +0200
Subject: Fix compilation on GNU/Hurd

According to explanation from:
http://www.gnu.org/software/hurd/hurd/porting/guidelines.html#GNU_specific_define_tt_
---
 Source/Common/gdcmSystem.cxx         | 4 ++++
 Source/DataDictionary/gdcmGlobal.cxx | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/Source/Common/gdcmSystem.cxx b/Source/Common/gdcmSystem.cxx
index 5d31526..b27ed13 100644
--- a/Source/Common/gdcmSystem.cxx
+++ b/Source/Common/gdcmSystem.cxx
@@ -460,6 +460,10 @@ std::wstring System::ConvertToUNC(const char *utf8path)
 #endif
 }
 
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
 // return size of file; also returns zero if no file exists
 size_t System::FileSize(const char* filename)
 {
diff --git a/Source/DataDictionary/gdcmGlobal.cxx b/Source/DataDictionary/gdcmGlobal.cxx
index 60051a1..e0f8dfe 100644
--- a/Source/DataDictionary/gdcmGlobal.cxx
+++ b/Source/DataDictionary/gdcmGlobal.cxx
@@ -138,6 +138,10 @@ bool Global::Prepend(const char *path)
 #define PATH_MAX 4096
 #endif
 
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
 const char *Global::Locate(const char *resfile) const
 {
 #ifdef _WIN32