Signed-off-by: Khem Raj <[email protected]>
---
 ...ot-use-LFS64-functions-on-linux-musl.patch | 37 +++++++++++++++++++
 .../vulkan/vulkan-samples_git.bb              |  1 +
 2 files changed, 38 insertions(+)
 create mode 100644 
meta/recipes-graphics/vulkan/vulkan-samples/0001-Do-not-use-LFS64-functions-on-linux-musl.patch

diff --git 
a/meta/recipes-graphics/vulkan/vulkan-samples/0001-Do-not-use-LFS64-functions-on-linux-musl.patch
 
b/meta/recipes-graphics/vulkan/vulkan-samples/0001-Do-not-use-LFS64-functions-on-linux-musl.patch
new file mode 100644
index 0000000000..f2bd7e510b
--- /dev/null
+++ 
b/meta/recipes-graphics/vulkan/vulkan-samples/0001-Do-not-use-LFS64-functions-on-linux-musl.patch
@@ -0,0 +1,37 @@
+From ce7a593e74c8e0c2ece15c73e7614d4f13a19a53 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 30 Dec 2022 13:04:08 -0800
+Subject: [PATCH] Do not use LFS64 functions on linux/musl
+
+On musl, off_t is 64bit always ( even on 32bit platforms ), therefore using
+LFS64 funcitons is not needed on such platforms. Moreover, musl has stopped
+providing aliases for these functions [1] which means it wont compile on
+newer musl systems. Therefore only use it on 32bit glibc/linux platforms
+and exclude musl like cygwin or OSX
+
+[1] 
https://git.musl-libc.org/cgit/musl/commit/?id=246f1c811448f37a44b41cd8df8d0ef9736d95f4
+
+Upstream-Status: Submitted [https://github.com/gabime/spdlog/pull/2589]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ include/spdlog/details/os.h | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h
+index 8e8476f0..be0a67b8 100644
+--- a/include/spdlog/details/os.h
++++ b/include/spdlog/details/os.h
+@@ -227,7 +227,9 @@ inline size_t filesize(FILE *f)
+ #else // unix
+     int fd = fileno(f);
+ // 64 bits(but not in osx or cygwin, where fstat64 is deprecated)
+-#if !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || 
defined(__ppc64__)) && !defined(__CYGWIN__)
++#if !defined(__FreeBSD__) && !defined(__APPLE__) && \
++    (defined(__linux__) && defined(__GLIBC__)) && \
++    (defined(__x86_64__) || defined(__ppc64__)) && !defined(__CYGWIN__)
+     struct stat64 st;
+     if (::fstat64(fd, &st) == 0)
+     {
+-- 
+2.39.0
+
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb 
b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
index de90a88502..6aabf2e3b8 100644
--- a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
+++ b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
@@ -9,6 +9,7 @@ SRC_URI = 
"gitsm://github.com/KhronosGroup/Vulkan-Samples.git;branch=master;prot
            
file://0001-CMakeLists.txt-do-not-hardcode-lib-as-installation-t.patch \
            file://debugfix.patch \
            
file://0001-Qualify-move-as-std-move.patch;patchdir=third_party/spirv-cross \
+           
file://0001-Do-not-use-LFS64-functions-on-linux-musl.patch;patchdir=third_party/spdlog
 \
            "
 
 UPSTREAM_CHECK_COMMITS = "1"
-- 
2.39.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#175177): 
https://lists.openembedded.org/g/openembedded-core/message/175177
Mute This Topic: https://lists.openembedded.org/mt/95961676/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to