diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-12-31 14:16:31 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-12-31 14:27:41 -0800 |
commit | 56dff418b8fb00edba4b8b363f869eab5cdce105 (patch) | |
tree | 49293602c4cc5a6c5a67d9419dec0df1eb878795 /meta-oe | |
parent | e941f2f79dba49fc7637db35c6dc2be64e78a9af (diff) | |
download | meta-openembedded-56dff418b8fb00edba4b8b363f869eab5cdce105.tar.gz |
spdlog: Do not use LFS64 functions with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r-- | meta-oe/recipes-support/spdlog/spdlog/0001-Do-not-use-LFS64-functions-on-linux-musl.patch | 30 | ||||
-rw-r--r-- | meta-oe/recipes-support/spdlog/spdlog_1.11.0.bb | 4 |
2 files changed, 33 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/spdlog/spdlog/0001-Do-not-use-LFS64-functions-on-linux-musl.patch b/meta-oe/recipes-support/spdlog/spdlog/0001-Do-not-use-LFS64-functions-on-linux-musl.patch new file mode 100644 index 000000000..b997389aa --- /dev/null +++ b/meta-oe/recipes-support/spdlog/spdlog/0001-Do-not-use-LFS64-functions-on-linux-musl.patch | |||
@@ -0,0 +1,30 @@ | |||
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 | --- a/include/spdlog/details/os-inl.h | ||
21 | +++ b/include/spdlog/details/os-inl.h | ||
22 | @@ -237,7 +237,7 @@ SPDLOG_INLINE size_t filesize(FILE *f) | ||
23 | int fd = ::fileno(f); | ||
24 | # endif | ||
25 | // 64 bits(but not in osx or cygwin, where fstat64 is deprecated) | ||
26 | -# if (defined(__linux__) || defined(__sun) || defined(_AIX)) && (defined(__LP64__) || defined(_LP64)) | ||
27 | +# if ((defined(__linux__) && defined(__GLIBC__)) || defined(__sun) || defined(_AIX)) && (defined(__LP64__) || defined(_LP64)) | ||
28 | struct stat64 st; | ||
29 | if (::fstat64(fd, &st) == 0) | ||
30 | { | ||
diff --git a/meta-oe/recipes-support/spdlog/spdlog_1.11.0.bb b/meta-oe/recipes-support/spdlog/spdlog_1.11.0.bb index 2c71331ff..ec985fb03 100644 --- a/meta-oe/recipes-support/spdlog/spdlog_1.11.0.bb +++ b/meta-oe/recipes-support/spdlog/spdlog_1.11.0.bb | |||
@@ -4,7 +4,9 @@ LICENSE = "MIT" | |||
4 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | 4 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" |
5 | 5 | ||
6 | SRCREV = "ad0e89cbfb4d0c1ce4d097e134eb7be67baebb36" | 6 | SRCREV = "ad0e89cbfb4d0c1ce4d097e134eb7be67baebb36" |
7 | SRC_URI = "git://github.com/gabime/spdlog.git;protocol=https;branch=v1.x" | 7 | SRC_URI = "git://github.com/gabime/spdlog.git;protocol=https;branch=v1.x \ |
8 | file://0001-Do-not-use-LFS64-functions-on-linux-musl.patch \ | ||
9 | " | ||
8 | 10 | ||
9 | DEPENDS += "fmt" | 11 | DEPENDS += "fmt" |
10 | 12 | ||