diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-12-30 13:12:11 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-12-31 17:08:29 +0000 |
commit | e73119966a0a20c0e380d9f7f5b5ea48feaf7dbb (patch) | |
tree | 1f71166ea3f8c22dedb217f8344f1836f3c6ac24 /meta/recipes-graphics/vulkan/vulkan-samples/0001-Do-not-use-LFS64-functions-on-linux-musl.patch | |
parent | b47198872c3f2ee34ada7887431e0fa4cadda98d (diff) | |
download | poky-e73119966a0a20c0e380d9f7f5b5ea48feaf7dbb.tar.gz |
vulkan-samples: Do not use LFS64 APIs in spdlog
(From OE-Core rev: cac83db8486943f013c5d33be2a353b492f20fd5)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/vulkan/vulkan-samples/0001-Do-not-use-LFS64-functions-on-linux-musl.patch')
-rw-r--r-- | meta/recipes-graphics/vulkan/vulkan-samples/0001-Do-not-use-LFS64-functions-on-linux-musl.patch | 37 |
1 files changed, 37 insertions, 0 deletions
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 @@ | |||
1 | From ce7a593e74c8e0c2ece15c73e7614d4f13a19a53 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 30 Dec 2022 13:04:08 -0800 | ||
4 | Subject: [PATCH] Do not use LFS64 functions on linux/musl | ||
5 | |||
6 | On musl, off_t is 64bit always ( even on 32bit platforms ), therefore using | ||
7 | LFS64 funcitons is not needed on such platforms. Moreover, musl has stopped | ||
8 | providing aliases for these functions [1] which means it wont compile on | ||
9 | newer musl systems. Therefore only use it on 32bit glibc/linux platforms | ||
10 | and exclude musl like cygwin or OSX | ||
11 | |||
12 | [1] https://git.musl-libc.org/cgit/musl/commit/?id=246f1c811448f37a44b41cd8df8d0ef9736d95f4 | ||
13 | |||
14 | Upstream-Status: Submitted [https://github.com/gabime/spdlog/pull/2589] | ||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | --- | ||
17 | include/spdlog/details/os.h | 4 +++- | ||
18 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h | ||
21 | index 8e8476f0..be0a67b8 100644 | ||
22 | --- a/include/spdlog/details/os.h | ||
23 | +++ b/include/spdlog/details/os.h | ||
24 | @@ -227,7 +227,9 @@ inline size_t filesize(FILE *f) | ||
25 | #else // unix | ||
26 | int fd = fileno(f); | ||
27 | // 64 bits(but not in osx or cygwin, where fstat64 is deprecated) | ||
28 | -#if !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__)) && !defined(__CYGWIN__) | ||
29 | +#if !defined(__FreeBSD__) && !defined(__APPLE__) && \ | ||
30 | + (defined(__linux__) && defined(__GLIBC__)) && \ | ||
31 | + (defined(__x86_64__) || defined(__ppc64__)) && !defined(__CYGWIN__) | ||
32 | struct stat64 st; | ||
33 | if (::fstat64(fd, &st) == 0) | ||
34 | { | ||
35 | -- | ||
36 | 2.39.0 | ||
37 | |||