mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
gnu: simg2img: Fix compilation with GCC 14.
* gnu/packages/android.scm (simg2img)[arguments]<#:phases>: Add 'patch-calloc-order. Change-Id: Ia5dc3a0dc23e1fbbd3a0bfe008c6e50fa4a04795 Signed-off-by: Andreas Enge <andreas@enge.fr>
This commit is contained in:
@@ -1358,7 +1358,23 @@ mounted via FUSE.")
|
||||
#:tests? #f ; no tests provided upstream
|
||||
#:phases
|
||||
;; There is no configure step.
|
||||
#~(modify-phases %standard-phases (delete 'configure))))
|
||||
#~(modify-phases %standard-phases
|
||||
(delete 'configure)
|
||||
(add-before 'build 'patch-calloc-order
|
||||
;; As of the 1.1.5 release, the calloc argument order is
|
||||
;; wrong, and GCC 14 recognises this. We correct it here.
|
||||
;; When updating this package, remove these patches
|
||||
;; (fixed in master).
|
||||
(lambda _
|
||||
(substitute* "backed_block.cpp"
|
||||
(("calloc[(]sizeof[(]struct backed_block_list[)], 1[)]")
|
||||
"calloc(1, sizeof(struct backed_block_list))"))
|
||||
(substitute* "simg2simg.cpp"
|
||||
(("calloc[(]sizeof[(]struct sparse_file[*][)], files[)]")
|
||||
"calloc(files, sizeof(struct sparse_file*))"))
|
||||
(substitute* "sparse.cpp"
|
||||
(("calloc[(]sizeof[(]struct sparse_file[)], 1[)]")
|
||||
"calloc(1, sizeof(struct sparse_file))")))))))
|
||||
(inputs (list zlib))
|
||||
(home-page "https://github.com/anestisb/android-simg2img")
|
||||
(synopsis "Convert Android sparse images to raw ext4 images")
|
||||
|
||||
Reference in New Issue
Block a user