summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-03-23 18:21:09 -0700
committerKhem Raj <raj.khem@gmail.com>2024-03-23 19:02:23 -0700
commita06056e78964369fa1ecdfdbc5a99895f232d083 (patch)
tree1cbcc161041a27594c5a00c57f460eec3badddd7 /meta-oe
parenta1938bff15159e6b95349cc8f61f12d1bd05f783 (diff)
downloadmeta-openembedded-a06056e78964369fa1ecdfdbc5a99895f232d083.tar.gz
plocate: Fix sys/stat.h and linux/stat.h conflicts with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-extended/plocate/plocate/0001-Include-linux-stat.h-only-when-sys-stat.h-is-not-inc.patch39
-rw-r--r--meta-oe/recipes-extended/plocate/plocate_1.1.22.bb3
2 files changed, 41 insertions, 1 deletions
diff --git a/meta-oe/recipes-extended/plocate/plocate/0001-Include-linux-stat.h-only-when-sys-stat.h-is-not-inc.patch b/meta-oe/recipes-extended/plocate/plocate/0001-Include-linux-stat.h-only-when-sys-stat.h-is-not-inc.patch
new file mode 100644
index 000000000..7ba266f44
--- /dev/null
+++ b/meta-oe/recipes-extended/plocate/plocate/0001-Include-linux-stat.h-only-when-sys-stat.h-is-not-inc.patch
@@ -0,0 +1,39 @@
1From 1d2197c195e19f1414afef75186bdd4c27b3ee5a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 23 Mar 2024 18:16:19 -0700
4Subject: [PATCH] Include linux/stat.h only when sys/stat.h is not included
5
6This ends up providing certain functions from both headers e.g.
7statx and statx_timestamp since liburing.h forcefully defines _GNU_SOURCE
8to help musl compile liburing, however, this define then causes these
9two files to conflict in plocate, it seems this file is redundant here
10when sys/stat.h is included anyway, mark it for conditional include
11
12Fixes
13| In file included from ../plocate-1.1.22/plocate.cpp:5:
14| In file included from ../plocate-1.1.22/io_uring_engine.h:14:
15| In file included from /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/plocate/1.1.22/recipe-sysroot/usr/include/liburing.h:14:
16| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/plocate/1.1.22/recipe-sysroot/usr/include/sys/stat.h:124:8: error: redefinition of 'statx_timestamp'
17| 124 | struct statx_timestamp {
18| | ^
19| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/plocate/1.1.22/recipe-sysroot/usr/include/linux/stat.h:56:8: note: previous definition is here | 56 | struct statx_timestamp { | | ^ | In file included from ../plocate-1.1.22/plocate.cpp:5: | In file included from ../plocate-1.1.22/io_uring_engine.h:14: | In file included from /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/plocate/1.1.22/recipe-sysroot/usr/include/liburing.h:14: | /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/plocate/1.1.22/recipe-sysroot/usr/include/sys/stat.h:129:8: error: redefinition of 'statx' | 129 | struct statx { | | ^ | /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/plocate/1.1.22/recipe-sysroot/usr/include/linux/stat.h:99:8: note: previous definition is here
20| 99 | struct statx {
21| | ^
22
23Upstream-Status: Pending
24
25Signed-off-by: Khem Raj <raj.khem@gmail.com>
26---
27 io_uring_engine.h | 2 ++
28 1 file changed, 2 insertions(+)
29
30--- a/io_uring_engine.h
31+++ b/io_uring_engine.h
32@@ -7,7 +7,6 @@
33 #include <string_view>
34 #include <sys/socket.h>
35 #include <sys/types.h>
36-#include <linux/stat.h>
37
38 struct io_uring_sqe;
39 #ifndef WITHOUT_URING
diff --git a/meta-oe/recipes-extended/plocate/plocate_1.1.22.bb b/meta-oe/recipes-extended/plocate/plocate_1.1.22.bb
index 07de35726..694c29776 100644
--- a/meta-oe/recipes-extended/plocate/plocate_1.1.22.bb
+++ b/meta-oe/recipes-extended/plocate/plocate_1.1.22.bb
@@ -9,6 +9,7 @@ inherit meson pkgconfig
9 9
10DEPENDS = "zstd liburing" 10DEPENDS = "zstd liburing"
11 11
12SRC_URI = "https://plocate.sesse.net/download/${BP}.tar.gz" 12SRC_URI = "https://plocate.sesse.net/download/${BP}.tar.gz \
13 file://0001-Include-linux-stat.h-only-when-sys-stat.h-is-not-inc.patch"
13 14
14SRC_URI[sha256sum] = "3b7e4741b4aa2ec044e53eff06474a32a3fb1e928b9382351fe79d4c27fb0049" 15SRC_URI[sha256sum] = "3b7e4741b4aa2ec044e53eff06474a32a3fb1e928b9382351fe79d4c27fb0049"