summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/musl/gcompat/0001-Add-fcntl64-wrapper.patch44
-rw-r--r--meta/recipes-core/musl/gcompat_git.bb1
2 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-core/musl/gcompat/0001-Add-fcntl64-wrapper.patch b/meta/recipes-core/musl/gcompat/0001-Add-fcntl64-wrapper.patch
new file mode 100644
index 0000000000..3f265e273a
--- /dev/null
+++ b/meta/recipes-core/musl/gcompat/0001-Add-fcntl64-wrapper.patch
@@ -0,0 +1,44 @@
1From 37f70f54c74c4ceeb089cbee88311ba00638f211 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 13 Oct 2023 21:02:23 -0700
4Subject: [PATCH] Add fcntl64 wrapper
5
6fixes loadtime errors with pvr precompiled driver for visionfive2
7
8load libpvr_dri_support.so: Error relocating /usr/lib/libpvr_dri_support.so: fcntl64: symbol not found
9
10Upstream-Status: Submitted [https://git.adelielinux.org/adelie/gcompat/-/merge_requests/28]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 libgcompat/unistd.c | 11 +++++++++++
14 1 file changed, 11 insertions(+)
15
16diff --git a/libgcompat/unistd.c b/libgcompat/unistd.c
17index 011fba2..400abf3 100644
18--- a/libgcompat/unistd.c
19+++ b/libgcompat/unistd.c
20@@ -1,6 +1,7 @@
21 #include <assert.h> /* assert */
22 #include <fcntl.h> /* O_CREAT */
23 #include <limits.h> /* NGROUPS_MAX */
24+#include <stdarg.h> /* va_list, va_start, va_end */
25 #include <stddef.h> /* NULL, size_t */
26 #include <unistd.h> /* confstr, getcwd, getgroups, ... */
27 #include <errno.h> /* ENOSYS, ENOMEM */
28@@ -250,3 +251,13 @@ int __close(int fd)
29 {
30 return close(fd);
31 }
32+
33+int fcntl64 (int fd, int cmd, ...)
34+{
35+ int ret;
36+ va_list ap;
37+ va_start(ap, cmd);
38+ ret = fcntl(fd, cmd, ap);
39+ va_end(ap);
40+ return ret;
41+}
42--
432.42.0
44
diff --git a/meta/recipes-core/musl/gcompat_git.bb b/meta/recipes-core/musl/gcompat_git.bb
index ba802e3caa..3e5541ba91 100644
--- a/meta/recipes-core/musl/gcompat_git.bb
+++ b/meta/recipes-core/musl/gcompat_git.bb
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=eb33ef4af05a9c7602843afb7adfe792"
9 9
10SRC_URI = "git://git.adelielinux.org/adelie/gcompat.git;protocol=https;branch=current \ 10SRC_URI = "git://git.adelielinux.org/adelie/gcompat.git;protocol=https;branch=current \
11 file://0001-auxv-new-module.patch \ 11 file://0001-auxv-new-module.patch \
12 file://0001-Add-fcntl64-wrapper.patch \
12 " 13 "
13SRC_URI:append:powerpc = "\ 14SRC_URI:append:powerpc = "\
14 file://0001-make-Static-PIE-does-not-work-on-musl-ppc.patch \ 15 file://0001-make-Static-PIE-does-not-work-on-musl-ppc.patch \