diff options
author | Sam James <sam@gentoo.org> | 2023-02-28 02:59:15 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-02-28 03:01:17 +0000 |
commit | 4bb6e57d6449617460fbac062618ab5f9ffe9c32 (patch) | |
tree | a698a8cdc18cd4dde20146deb5575ece9d8fe5e3 /sys-libs | |
parent | app-text/texlive-core: fix another Clang 16 configure issue (diff) | |
download | gentoo-4bb6e57d6449617460fbac062618ab5f9ffe9c32.tar.gz gentoo-4bb6e57d6449617460fbac062618ab5f9ffe9c32.tar.bz2 gentoo-4bb6e57d6449617460fbac062618ab5f9ffe9c32.zip |
sys-libs/libnvme: fix configure w/ clang 16
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/libnvme/files/libnvme-1.3-configure-clang-16.patch | 32 | ||||
-rw-r--r-- | sys-libs/libnvme/libnvme-1.3-r1.ebuild (renamed from sys-libs/libnvme/libnvme-1.3.ebuild) | 4 |
2 files changed, 36 insertions, 0 deletions
diff --git a/sys-libs/libnvme/files/libnvme-1.3-configure-clang-16.patch b/sys-libs/libnvme/files/libnvme-1.3-configure-clang-16.patch new file mode 100644 index 000000000000..b7954a996272 --- /dev/null +++ b/sys-libs/libnvme/files/libnvme-1.3-configure-clang-16.patch @@ -0,0 +1,32 @@ +https://github.com/linux-nvme/libnvme/commit/ddfb3ba036f9df2737c165b27f9b458dd83a7df8 + +From ddfb3ba036f9df2737c165b27f9b458dd83a7df8 Mon Sep 17 00:00:00 2001 +From: Tomas Bzatek <tbzatek@redhat.com> +Date: Tue, 31 Jan 2023 23:27:53 +0100 +Subject: [PATCH] build: Fix nss code snippet includes + +With hardened distribution CFLAGS the meson code snippet wouldn't compile: + +Compiler stderr: + .build/meson-private/tmpy2z1t5q4/testfile.c: In function 'main': + .build/meson-private/tmpy2z1t5q4/testfile.c:2:30: error: storage size of 'hints' isn't known + 2 | struct addrinfo hints, *result; + | ^~~~~ + .build/meson-private/tmpy2z1t5q4/testfile.c:3:21: warning: implicit declaration of function 'getaddrinfo' [-Wimplicit-function-declaration] + 3 | return getaddrinfo(argv[1], argv[2], &hints, &result); + | ^~~~~~~~~~~ +--- a/meson.build ++++ b/meson.build +@@ -199,7 +199,10 @@ conf.set10( + conf.set( + 'HAVE_LIBNSS', + cc.links( +- '''int main(int argc, char **argv) { ++ '''#include <sys/types.h> ++ #include <sys/socket.h> ++ #include <netdb.h> ++ int main(int argc, char **argv) { + struct addrinfo hints, *result; + return getaddrinfo(argv[1], argv[2], &hints, &result); + } + diff --git a/sys-libs/libnvme/libnvme-1.3.ebuild b/sys-libs/libnvme/libnvme-1.3-r1.ebuild index aaed25b8d4b8..fe8743ba86d6 100644 --- a/sys-libs/libnvme/libnvme-1.3.ebuild +++ b/sys-libs/libnvme/libnvme-1.3-r1.ebuild @@ -32,6 +32,10 @@ REQUIRED_USE=" python? ( ${PYTHON_REQUIRED_USE} ) " +PATCHES=( + "${FILESDIR}"/${P}-configure-clang-16.patch +) + src_configure() { local emesonargs=( -Dpython=false |