aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--community/plocate/APKBUILD3
-rw-r--r--community/plocate/fix-statx.patch41
2 files changed, 44 insertions, 0 deletions
diff --git a/community/plocate/APKBUILD b/community/plocate/APKBUILD
index e03162bcbfa..456ee7442f5 100644
--- a/community/plocate/APKBUILD
+++ b/community/plocate/APKBUILD
@@ -20,6 +20,8 @@ subpackages="$pkgname-doc"
source="https://plocate.sesse.net/download/plocate-$pkgver.tar.gz
plocate.cron
updatedb.conf
+
+ fix-statx.patch
"
# no tests
# plocate is g+s
@@ -48,4 +50,5 @@ sha512sums="
c26ea85f4cc7249f1af7450cfd07f59a03ea98b970f4be67222282fda7789bf9a8fe3d24835f6f3f6068d54802c1fe1e2b9a487e04d568965a23df34845178c1 plocate-1.1.22.tar.gz
4f3f1ef1016abe0488fe0b61eec03fa6ce340d4abe59b4d371d0085934244cffe3af67669505ded2427f03a026857806de0479050d4e023817cae58390a7cb88 plocate.cron
863d8687bc1c520cc262ade3a7ce8a02b6930d7cbbc588c36d23f81a4a4c5432f4d9234a5498632b767a352e3996cf4da1c9e98d1b699b9d973cd9a9313d9557 updatedb.conf
+c25d3c8b255458184a1824e4fe87244b2cb73e0c5c08f8656fea3518a4c3b6afafa28da9fd29fdd68cf3f034dbb7846e673d92993719340b03a1027270a4e5d7 fix-statx.patch
"
diff --git a/community/plocate/fix-statx.patch b/community/plocate/fix-statx.patch
new file mode 100644
index 00000000000..5254b02b1b0
--- /dev/null
+++ b/community/plocate/fix-statx.patch
@@ -0,0 +1,41 @@
+Patch-Source: https://git.openembedded.org/meta-openembedded/plain/meta-oe/recipes-extended/plocate/plocate/0001-Include-linux-stat.h-only-when-sys-stat.h-is-not-inc.patch
+--
+From 1d2197c195e19f1414afef75186bdd4c27b3ee5a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 23 Mar 2024 18:16:19 -0700
+Subject: [PATCH] Include linux/stat.h only when sys/stat.h is not included
+
+This ends up providing certain functions from both headers e.g.
+statx and statx_timestamp since liburing.h forcefully defines _GNU_SOURCE
+to help musl compile liburing, however, this define then causes these
+two files to conflict in plocate, it seems this file is redundant here
+when sys/stat.h is included anyway, mark it for conditional include
+
+Fixes
+| 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:124:8: error: redefinition of 'statx_timestamp'
+| 124 | struct statx_timestamp {
+| | ^
+| /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
+| 99 | struct statx {
+| | ^
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ io_uring_engine.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/io_uring_engine.h
++++ b/io_uring_engine.h
+@@ -7,7 +7,6 @@
+ #include <string_view>
+ #include <sys/socket.h>
+ #include <sys/types.h>
+-#include <linux/stat.h>
+
+ struct io_uring_sqe;
+ #ifndef WITHOUT_URING