diff options
author | David Elsing <david.elsing@posteo.net> | 2025-07-29 16:19:32 +0200 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-07-31 23:19:08 +0100 |
commit | b94aae49b75478ec6eab937161fb994386099042 (patch) | |
tree | 6a4532ce0a818cea4d6319dc461def3f751d622f | |
parent | 9122274303ee68485cf062b55f562ef9cab66927 (diff) |
gnu: sajson: Fix build.
Prevent the example from calling fclose multiple times.
* gnu/packages/cpp.scm (sajson)[arguments]: Add 'fix-example phase.
Change-Id: Icec4ef43fe5835810411a5a5681d552c5744aae6
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
-rw-r--r-- | gnu/packages/cpp.scm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 1a991ac08c..0e61b49bbf 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -3562,6 +3562,11 @@ different floating point sizes and complex transformations.") (string-append #$(this-package-native-input "unittest-cpp") "/lib") "', LIBS=['UnitTest++'])"))))) + (add-after 'unpack 'fix-example + (lambda _ + (substitute* "example/main.cpp" + (("fclose\\(file\\);") + "if (file != nullptr) {fclose(file); file = nullptr;}")))) (replace 'build (lambda* (#:key tests? #:allow-other-keys #:rest args) (when tests? |