mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-04 14:39:54 +00:00
minifi-cpp: Always use stat on 64bit linux
stat64 is an alias to stat on 64bit linux moreover this makes it work with musl where LFS64 functions are deprecated Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
+35
@@ -0,0 +1,35 @@
|
|||||||
|
From 6690e7fe566445e20fec178e9e209e5f9f2fdde3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Date: Wed, 5 Apr 2023 23:33:46 -0700
|
||||||
|
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 <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
thirdparty/spdlog-20170710/include/spdlog/details/os.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/thirdparty/spdlog-20170710/include/spdlog/details/os.h b/thirdparty/spdlog-20170710/include/spdlog/details/os.h
|
||||||
|
index 735f60147..639b07a79 100644
|
||||||
|
--- a/thirdparty/spdlog-20170710/include/spdlog/details/os.h
|
||||||
|
+++ b/thirdparty/spdlog-20170710/include/spdlog/details/os.h
|
||||||
|
@@ -237,7 +237,7 @@ inline size_t filesize(FILE *f)
|
||||||
|
#else // unix
|
||||||
|
int fd = fileno(f);
|
||||||
|
//64 bits(but not in osx, where fstat64 is deprecated)
|
||||||
|
-#if !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__))
|
||||||
|
+#if !defined(__FreeBSD__) && !defined(__APPLE__) && ((defined(__x86_64__) || defined(__ppc64__)) && (!defined(__linux__)))
|
||||||
|
struct stat64 st;
|
||||||
|
if (fstat64(fd, &st) == 0)
|
||||||
|
return static_cast<size_t>(st.st_size);
|
||||||
|
--
|
||||||
|
2.40.0
|
||||||
|
|
||||||
@@ -32,6 +32,7 @@ SRC_URI = "git://github.com/apache/nifi-minifi-cpp.git;branch=master;protocol=ht
|
|||||||
file://0001-Fix-build-with-libc.patch \
|
file://0001-Fix-build-with-libc.patch \
|
||||||
file://0001-civetweb-Disable-lto.patch \
|
file://0001-civetweb-Disable-lto.patch \
|
||||||
file://0001-Add-missing-includes-cstdint-and-cstdio.patch \
|
file://0001-Add-missing-includes-cstdint-and-cstdio.patch \
|
||||||
|
file://0001-Do-not-use-LFS64-functions-on-linux-musl.patch \
|
||||||
file://minifi.service \
|
file://minifi.service \
|
||||||
file://systemd-volatile.conf \
|
file://systemd-volatile.conf \
|
||||||
file://sysvinit-volatile.conf \
|
file://sysvinit-volatile.conf \
|
||||||
|
|||||||
Reference in New Issue
Block a user