commit: 03f6b6cdc6dcb889208e1c32100f58a2b4d6eab6 Author: Violet Purcell <vimproved <AT> inventati <DOT> org> AuthorDate: Mon Jun 26 21:52:52 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Mon Sep 18 08:51:56 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03f6b6cd
dev-util/debugedit: Fix build on musl 1.2.4 Signed-off-by: Violet Purcell <vimproved <AT> inventati.org> Closes: https://github.com/gentoo/gentoo/pull/31631 Signed-off-by: Sam James <sam <AT> gentoo.org> ...gedit-5.0-r1.ebuild => debugedit-5.0-r2.ebuild} | 3 ++ .../debugedit/files/debugedit-5.0-musl-1.2.4.patch | 38 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/dev-util/debugedit/debugedit-5.0-r1.ebuild b/dev-util/debugedit/debugedit-5.0-r2.ebuild similarity index 92% rename from dev-util/debugedit/debugedit-5.0-r1.ebuild rename to dev-util/debugedit/debugedit-5.0-r2.ebuild index 6ec21d7d3bb5..eef678585541 100644 --- a/dev-util/debugedit/debugedit-5.0-r1.ebuild +++ b/dev-util/debugedit/debugedit-5.0-r2.ebuild @@ -35,6 +35,9 @@ PATCHES=( "${FILESDIR}"/${P}-zero-dir-entry.patch "${FILESDIR}"/${P}-hppa.patch "${FILESDIR}"/${P}-musl-error.h-fix.patch + + # Upstreamed, remove next release + "${FILESDIR}"/${P}-musl-1.2.4.patch ) src_prepare() { diff --git a/dev-util/debugedit/files/debugedit-5.0-musl-1.2.4.patch b/dev-util/debugedit/files/debugedit-5.0-musl-1.2.4.patch new file mode 100644 index 000000000000..1fe01df67c2a --- /dev/null +++ b/dev-util/debugedit/files/debugedit-5.0-musl-1.2.4.patch @@ -0,0 +1,38 @@ +From 187ba161d1d18ad0d675115d8a9eee7ec1790074 Mon Sep 17 00:00:00 2001 +From: Violet Purcell <vimpro...@inventati.org> +Date: Mon, 26 Jun 2023 21:46:20 +0000 +Subject: [PATCH] Fix build failure on musl 1.2.4 due to removal of LFS64 + compat symbols. + +--- a/tools/sepdebugcrcfix.c ++++ b/tools/sepdebugcrcfix.c +@@ -144,7 +144,7 @@ crc32 (const char *fname, const char *base_fname, uint32_t *crcp) + error (0, errno, _("cannot open \"%s\""), debugname); + return false; + } +- off64_t size = lseek64 (fd, 0, SEEK_END); ++ off_t size = lseek (fd, 0, SEEK_END); + if (size == -1) + { + error (0, errno, _("cannot get size of \"%s\""), debugname); +@@ -289,7 +289,7 @@ process (Elf *elf, int fd, const char *fname) + return true; + } + updated_count++; +- off64_t seekto = (shdr->sh_offset + data->d_off ++ off_t seekto = (shdr->sh_offset + data->d_off + + (crcp - (const uint8_t *) data->d_buf)); + uint32_t crc_targetendian = (ehdr->e_ident[EI_DATA] == ELFDATA2LSB + ? htole32 (crc) : htobe32 (crc)); +@@ -361,7 +361,7 @@ main (int argc, char **argv) + error (0, errno, _("cannot chmod \"%s\" to make sure we can read and write"), fname); + + bool failed = false; +- int fd = open64 (fname, O_RDWR); ++ int fd = open (fname, O_RDWR); + if (fd == -1) + { + error (0, errno, _("cannot open \"%s\""), fname); +-- +2.41.0 +