From 1f6d4a702a9e125d29bedf3250d26ba45ee96dba Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Wed, 14 Dec 2022 00:38:51 +0100 Subject: [PATCH 1/2] gnu: libbacktrace: Add patch. * gnu/packages/debug.scm (libbacktrace)[source]: Add patch. * gnu/local.mk: Add patch. * patches/libbacktrace-remove-static-keyword.patch: New variable. diff --git a/gnu/local.mk b/gnu/local.mk index 3329801fa6..6a70b4b48d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1418,6 +1418,7 @@ dist_patch_DATA = \ %D%/packages/patches/liba52-link-with-libm.patch \ %D%/packages/patches/liba52-set-soname.patch \ %D%/packages/patches/liba52-use-mtune-not-mcpu.patch \ + %D%/packages/patches/libbacktrace-remove-static-keyword.patch \ %D%/packages/patches/libbase-fix-includes.patch \ %D%/packages/patches/libbase-use-own-logging.patch \ %D%/packages/patches/libbonobo-activation-test-race.patch \ diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm index 1c4f570fe4..4c0e7c58be 100644 --- a/gnu/packages/debug.scm +++ b/gnu/packages/debug.scm @@ -695,6 +695,8 @@ (define-public libbacktrace (uri (git-reference (url "https://github.com/ianlancetaylor/libbacktrace") (commit commit))) + (patches + (search-patches "libbacktrace-remove-static-keyword.patch")) (file-name (git-file-name name version)) (sha256 (base32 diff --git a/gnu/packages/patches/libbacktrace-remove-static-keyword.patch b/gnu/packages/patches/libbacktrace-remove-static-keyword.patch new file mode 100644 index 0000000000..05ae3dddcd --- /dev/null +++ b/gnu/packages/patches/libbacktrace-remove-static-keyword.patch @@ -0,0 +1,40 @@ +From c866f91b07d6d366a88c3fb50f69cfa8eefa10d3 Mon Sep 17 00:00:00 2001 +From: Petr Hodina +Date: Mon, 12 Dec 2022 22:16:37 +0100 +Subject: [PATCH] Remove static keyword from several function. + + +diff --git a/elf.c b/elf.c +index ab21d2e..e62b328 100644 +--- a/elf.c ++++ b/elf.c +@@ -557,7 +557,7 @@ elf_crc32_file (struct backtrace_state *state, int descriptor, + /* A dummy callback function used when we can't find a symbol + table. */ + +-static void ++void + elf_nosyms (struct backtrace_state *state ATTRIBUTE_UNUSED, + uintptr_t addr ATTRIBUTE_UNUSED, + backtrace_syminfo_callback callback ATTRIBUTE_UNUSED, +@@ -758,7 +758,7 @@ elf_add_syminfo_data (struct backtrace_state *state, + + /* Return the symbol name and value for an ADDR. */ + +-static void ++void + elf_syminfo (struct backtrace_state *state, uintptr_t addr, + backtrace_syminfo_callback callback, + backtrace_error_callback error_callback ATTRIBUTE_UNUSED, +@@ -6467,7 +6467,7 @@ backtrace_uncompress_lzma (struct backtrace_state *state, + elf_add will need to be called on the descriptor again after + base_address is determined. */ + +-static int ++int + elf_add (struct backtrace_state *state, const char *filename, int descriptor, + const unsigned char *memory, size_t memory_size, + uintptr_t base_address, backtrace_error_callback error_callback, +-- +2.38.1 + -- 2.38.1