From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6AD5B158064 for ; Sat, 4 May 2024 12:43:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A9FE5E2ACF; Sat, 4 May 2024 12:43:57 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 88412E2AE6 for ; Sat, 4 May 2024 12:43:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B1F0C343143 for ; Sat, 4 May 2024 12:43:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EB3A619F0 for ; Sat, 4 May 2024 12:43:54 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1714826628.44d0530879ab4219ce8452c8aa33fc75b1a03141.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libnvme/, sys-libs/libnvme/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/libnvme/files/libnvme-1.9-musl-stdint.patch sys-libs/libnvme/libnvme-1.9.ebuild X-VCS-Directories: sys-libs/libnvme/ sys-libs/libnvme/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 44d0530879ab4219ce8452c8aa33fc75b1a03141 X-VCS-Branch: master Date: Sat, 4 May 2024 12:43:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5007a087-f597-4c09-898a-f61da608d995 X-Archives-Hash: 9d0ff8b215cfcae0aac9705b824490cd commit: 44d0530879ab4219ce8452c8aa33fc75b1a03141 Author: Sam James gentoo org> AuthorDate: Sat May 4 12:43:48 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sat May 4 12:43:48 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44d05308 sys-libs/libnvme: fix musl build I don't think this actually failed, unlike libnvme, but pull in the patches for completeness. Bug: https://bugs.gentoo.org/931194 Signed-off-by: Sam James gentoo.org> .../libnvme/files/libnvme-1.9-musl-stdint.patch | 59 ++++++++++++++++++++++ sys-libs/libnvme/libnvme-1.9.ebuild | 4 ++ 2 files changed, 63 insertions(+) diff --git a/sys-libs/libnvme/files/libnvme-1.9-musl-stdint.patch b/sys-libs/libnvme/files/libnvme-1.9-musl-stdint.patch new file mode 100644 index 000000000000..c2319b72bc96 --- /dev/null +++ b/sys-libs/libnvme/files/libnvme-1.9-musl-stdint.patch @@ -0,0 +1,59 @@ +https://github.com/linux-nvme/libnvme/pull/838 + +From b3ca2923affce631bc302f0fdce565093ffe1b5b Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Sat, 4 May 2024 10:59:16 +0100 +Subject: [PATCH] Use C99 types for uint32_t + + provides `uint32_t`, while `u_int_32` is an unofficial/internal +typedef that glibc happens to provide. This fixes the build on musl. + +Bug: https://bugs.gentoo.org/931194 + +Signed-off-by: Sam James +--- a/src/nvme/base64.c ++++ b/src/nvme/base64.c +@@ -7,6 +7,7 @@ + * Author: Hannes Reinecke + */ + ++#include + #include + #include + #include +@@ -29,7 +30,7 @@ static const char base64_table[65] = + int base64_encode(const unsigned char *src, int srclen, char *dst) + { + int i, bits = 0; +- u_int32_t ac = 0; ++ uint32_t ac = 0; + char *cp = dst; + + for (i = 0; i < srclen; i++) { +@@ -64,7 +65,7 @@ int base64_encode(const unsigned char *src, int srclen, char *dst) + */ + int base64_decode(const char *src, int srclen, unsigned char *dst) + { +- u_int32_t ac = 0; ++ uint32_t ac = 0; + int i, bits = 0; + unsigned char *bp = dst; + +--- a/src/nvme/linux.c ++++ b/src/nvme/linux.c +@@ -1513,10 +1513,10 @@ unsigned char *nvme_import_tls_key(const char *encoded_key, int *key_len, + return NULL; + } + crc = crc32(crc, decoded_key, decoded_len); +- key_crc = ((u_int32_t)decoded_key[decoded_len]) | +- ((u_int32_t)decoded_key[decoded_len + 1] << 8) | +- ((u_int32_t)decoded_key[decoded_len + 2] << 16) | +- ((u_int32_t)decoded_key[decoded_len + 3] << 24); ++ key_crc = ((uint32_t)decoded_key[decoded_len]) | ++ ((uint32_t)decoded_key[decoded_len + 1] << 8) | ++ ((uint32_t)decoded_key[decoded_len + 2] << 16) | ++ ((uint32_t)decoded_key[decoded_len + 3] << 24); + if (key_crc != crc) { + nvme_msg(NULL, LOG_ERR, "CRC mismatch (key %08x, crc %08x)", + key_crc, crc); + diff --git a/sys-libs/libnvme/libnvme-1.9.ebuild b/sys-libs/libnvme/libnvme-1.9.ebuild index 1cc2223f879a..3436c4d122bd 100644 --- a/sys-libs/libnvme/libnvme-1.9.ebuild +++ b/sys-libs/libnvme/libnvme-1.9.ebuild @@ -35,6 +35,10 @@ BDEPEND=" dev-lang/swig " +PATCHES=( + "${FILESDIR}"/${PN}-1.9-musl-stdint.patch +) + src_configure() { local emesonargs=( -Dpython=disabled