From: Khem Raj Date: Sat, 14 Oct 2023 15:39:23 +0000 (-0700) Subject: gcompat: Add fcntl64 wrapper X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6efe08c5aa419db5c865a14116d137ff37db221;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git gcompat: Add fcntl64 wrapper Needed by pvr mesa drivers Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- 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 00000000000..3f265e273a9 --- /dev/null +++ b/meta/recipes-core/musl/gcompat/0001-Add-fcntl64-wrapper.patch @@ -0,0 +1,44 @@ +From 37f70f54c74c4ceeb089cbee88311ba00638f211 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 13 Oct 2023 21:02:23 -0700 +Subject: [PATCH] Add fcntl64 wrapper + +fixes loadtime errors with pvr precompiled driver for visionfive2 + +load libpvr_dri_support.so: Error relocating /usr/lib/libpvr_dri_support.so: fcntl64: symbol not found + +Upstream-Status: Submitted [https://git.adelielinux.org/adelie/gcompat/-/merge_requests/28] +Signed-off-by: Khem Raj +--- + libgcompat/unistd.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/libgcompat/unistd.c b/libgcompat/unistd.c +index 011fba2..400abf3 100644 +--- a/libgcompat/unistd.c ++++ b/libgcompat/unistd.c +@@ -1,6 +1,7 @@ + #include /* assert */ + #include /* O_CREAT */ + #include /* NGROUPS_MAX */ ++#include /* va_list, va_start, va_end */ + #include /* NULL, size_t */ + #include /* confstr, getcwd, getgroups, ... */ + #include /* ENOSYS, ENOMEM */ +@@ -250,3 +251,13 @@ int __close(int fd) + { + return close(fd); + } ++ ++int fcntl64 (int fd, int cmd, ...) ++{ ++ int ret; ++ va_list ap; ++ va_start(ap, cmd); ++ ret = fcntl(fd, cmd, ap); ++ va_end(ap); ++ return ret; ++} +-- +2.42.0 + diff --git a/meta/recipes-core/musl/gcompat_git.bb b/meta/recipes-core/musl/gcompat_git.bb index ba802e3caaa..3e5541ba91e 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" SRC_URI = "git://git.adelielinux.org/adelie/gcompat.git;protocol=https;branch=current \ file://0001-auxv-new-module.patch \ + file://0001-Add-fcntl64-wrapper.patch \ " SRC_URI:append:powerpc = "\ file://0001-make-Static-PIE-does-not-work-on-musl-ppc.patch \