Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporary GNU 13 Silo Build Fix #447

Merged
merged 1 commit into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion toolchain/dependencies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ if (MFC_SILO)
GIT_REPOSITORY "https://github.com/LLNL/Silo"
GIT_TAG 438477c80d32a3e1757d4584b993f382cace1535
GIT_PROGRESS ON
PATCH_COMMAND "${GIT_EXECUTABLE}" stash && "${GIT_EXECUTABLE}" apply "${CMAKE_SOURCE_DIR}/Silo.patch"
PATCH_COMMAND "${GIT_EXECUTABLE}" stash
&& "${GIT_EXECUTABLE}" apply "${CMAKE_SOURCE_DIR}/Silo.patch"
&& "${GIT_EXECUTABLE}" apply "${CMAKE_SOURCE_DIR}/Silo-GNU-13.patch"
CMAKE_ARGS -DSILO_ENABLE_SHARED=OFF
-DSILO_ENABLE_SILOCK=OFF
-DSILO_ENABLE_BROWSER=OFF
Expand Down
31 changes: 31 additions & 0 deletions toolchain/dependencies/Silo-GNU-13.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From 51f0a23e72b366358146bb272d6d5c297929b0b0 Mon Sep 17 00:00:00 2001
From: Henry LE BERRE <[email protected]>
Date: Thu, 30 May 2024 19:15:23 +0200
Subject: [PATCH] Temporary GNU 13 Silo Build Fix

---
src/hdf5_drv/silo_hdf5.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/hdf5_drv/silo_hdf5.c b/src/hdf5_drv/silo_hdf5.c
index 9a00194..cc23fbf 100644
--- a/src/hdf5_drv/silo_hdf5.c
+++ b/src/hdf5_drv/silo_hdf5.c
@@ -1810,8 +1810,12 @@ db_hdf5_cwg(DBfile *_dbfile)
else \
*dscount = m.MEMCNT; \
*dsnames = (char **) calloc(*dscount, sizeof(char**)); \
- for (i = 0; i < *dscount; i++) \
- (*dsnames)[i] = strdup(m.MEMNAME[i]); \
+ if (sizeof(m.MEMNAME[0]) >= sizeof(char)) { \
+ for (i = 0; i < *dscount; i++) \
+ (*dsnames)[i] = strdup((char*)m.MEMNAME[i]); \
+ } else { \
+ (*dsnames)[0] = strdup((char*)m.MEMNAME); \
+ } \
break; \
}

--
2.45.1

Loading