mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
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>
This commit is contained in:
committed by
Sharlatan Hellseher
parent
9122274303
commit
b94aae49b7
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user