summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Malaterre <malat@debian.org>2024-05-05 16:45:36 +0200
committerÉtienne Mollier <emollier@debian.org>2024-05-05 16:45:36 +0200
commit82a984daef1268f55ae324cd377fbd15ad7509cf (patch)
tree686698a11faead3e32c7695fcbaa1f072b068bc8
parent143f20de42ec1665e9e8174521ff10819e4c0a99 (diff)
Fix compilation on GNU/Hurd
According to explanation from: http://www.gnu.org/software/hurd/hurd/porting/guidelines.html#GNU_specific_define_tt_ Gbp-Pq: Name 02_fixhurd.patch
-rw-r--r--Source/Common/gdcmSystem.cxx4
-rw-r--r--Source/DataDictionary/gdcmGlobal.cxx4
2 files changed, 8 insertions, 0 deletions
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