1 |
commit: 4bb6e57d6449617460fbac062618ab5f9ffe9c32 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 28 02:59:15 2023 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 28 03:01:17 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bb6e57d |
7 |
|
8 |
sys-libs/libnvme: fix configure w/ clang 16 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
.../files/libnvme-1.3-configure-clang-16.patch | 32 ++++++++++++++++++++++ |
13 |
.../{libnvme-1.3.ebuild => libnvme-1.3-r1.ebuild} | 4 +++ |
14 |
2 files changed, 36 insertions(+) |
15 |
|
16 |
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 |
17 |
new file mode 100644 |
18 |
index 000000000000..b7954a996272 |
19 |
--- /dev/null |
20 |
+++ b/sys-libs/libnvme/files/libnvme-1.3-configure-clang-16.patch |
21 |
@@ -0,0 +1,32 @@ |
22 |
+https://github.com/linux-nvme/libnvme/commit/ddfb3ba036f9df2737c165b27f9b458dd83a7df8 |
23 |
+ |
24 |
+From ddfb3ba036f9df2737c165b27f9b458dd83a7df8 Mon Sep 17 00:00:00 2001 |
25 |
+From: Tomas Bzatek <tbzatek@××××××.com> |
26 |
+Date: Tue, 31 Jan 2023 23:27:53 +0100 |
27 |
+Subject: [PATCH] build: Fix nss code snippet includes |
28 |
+ |
29 |
+With hardened distribution CFLAGS the meson code snippet wouldn't compile: |
30 |
+ |
31 |
+Compiler stderr: |
32 |
+ .build/meson-private/tmpy2z1t5q4/testfile.c: In function 'main': |
33 |
+ .build/meson-private/tmpy2z1t5q4/testfile.c:2:30: error: storage size of 'hints' isn't known |
34 |
+ 2 | struct addrinfo hints, *result; |
35 |
+ | ^~~~~ |
36 |
+ .build/meson-private/tmpy2z1t5q4/testfile.c:3:21: warning: implicit declaration of function 'getaddrinfo' [-Wimplicit-function-declaration] |
37 |
+ 3 | return getaddrinfo(argv[1], argv[2], &hints, &result); |
38 |
+ | ^~~~~~~~~~~ |
39 |
+--- a/meson.build |
40 |
++++ b/meson.build |
41 |
+@@ -199,7 +199,10 @@ conf.set10( |
42 |
+ conf.set( |
43 |
+ 'HAVE_LIBNSS', |
44 |
+ cc.links( |
45 |
+- '''int main(int argc, char **argv) { |
46 |
++ '''#include <sys/types.h> |
47 |
++ #include <sys/socket.h> |
48 |
++ #include <netdb.h> |
49 |
++ int main(int argc, char **argv) { |
50 |
+ struct addrinfo hints, *result; |
51 |
+ return getaddrinfo(argv[1], argv[2], &hints, &result); |
52 |
+ } |
53 |
+ |
54 |
|
55 |
diff --git a/sys-libs/libnvme/libnvme-1.3.ebuild b/sys-libs/libnvme/libnvme-1.3-r1.ebuild |
56 |
similarity index 95% |
57 |
rename from sys-libs/libnvme/libnvme-1.3.ebuild |
58 |
rename to sys-libs/libnvme/libnvme-1.3-r1.ebuild |
59 |
index aaed25b8d4b8..fe8743ba86d6 100644 |
60 |
--- a/sys-libs/libnvme/libnvme-1.3.ebuild |
61 |
+++ b/sys-libs/libnvme/libnvme-1.3-r1.ebuild |
62 |
@@ -32,6 +32,10 @@ REQUIRED_USE=" |
63 |
python? ( ${PYTHON_REQUIRED_USE} ) |
64 |
" |
65 |
|
66 |
+PATCHES=( |
67 |
+ "${FILESDIR}"/${P}-configure-clang-16.patch |
68 |
+) |
69 |
+ |
70 |
src_configure() { |
71 |
local emesonargs=( |
72 |
-Dpython=false |