summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-04-05 23:43:28 -0700
committerKhem Raj <raj.khem@gmail.com>2023-04-06 13:45:10 -0700
commitf1ab25b104fafcefb794c7930b3fa713c216461b (patch)
tree84f249fa46f3535921f86214ef258b02f5059176
parentdd5e8525160ea9ce494df7a7fb1443dd8c7bc732 (diff)
downloadmeta-openembedded-f1ab25b104fafcefb794c7930b3fa713c216461b.tar.gz
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>
-rw-r--r--meta-oe/recipes-extended/minifi-cpp/files/0001-Do-not-use-LFS64-functions-on-linux-musl.patch35
-rw-r--r--meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb1
2 files changed, 36 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/minifi-cpp/files/0001-Do-not-use-LFS64-functions-on-linux-musl.patch b/meta-oe/recipes-extended/minifi-cpp/files/0001-Do-not-use-LFS64-functions-on-linux-musl.patch
new file mode 100644
index 0000000000..29f5b94a04
--- /dev/null
+++ b/meta-oe/recipes-extended/minifi-cpp/files/0001-Do-not-use-LFS64-functions-on-linux-musl.patch
@@ -0,0 +1,35 @@
1From 6690e7fe566445e20fec178e9e209e5f9f2fdde3 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 5 Apr 2023 23:33:46 -0700
4Subject: [PATCH] Do not use LFS64 functions on linux/musl
5
6On musl, off_t is 64bit always ( even on 32bit platforms ), therefore using
7LFS64 funcitons is not needed on such platforms. Moreover, musl has stopped
8providing aliases for these functions [1] which means it wont compile on
9newer musl systems. Therefore only use it on 32bit glibc/linux platforms
10and exclude musl like cygwin or OSX
11
12[1] https://git.musl-libc.org/cgit/musl/commit/?id=246f1c811448f37a44b41cd8df8d0ef9736d95f4
13
14Upstream-Status: Submitted [https://github.com/gabime/spdlog/pull/2589]
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 thirdparty/spdlog-20170710/include/spdlog/details/os.h | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/thirdparty/spdlog-20170710/include/spdlog/details/os.h b/thirdparty/spdlog-20170710/include/spdlog/details/os.h
21index 735f60147..639b07a79 100644
22--- a/thirdparty/spdlog-20170710/include/spdlog/details/os.h
23+++ b/thirdparty/spdlog-20170710/include/spdlog/details/os.h
24@@ -237,7 +237,7 @@ inline size_t filesize(FILE *f)
25 #else // unix
26 int fd = fileno(f);
27 //64 bits(but not in osx, where fstat64 is deprecated)
28-#if !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__))
29+#if !defined(__FreeBSD__) && !defined(__APPLE__) && ((defined(__x86_64__) || defined(__ppc64__)) && (!defined(__linux__)))
30 struct stat64 st;
31 if (fstat64(fd, &st) == 0)
32 return static_cast<size_t>(st.st_size);
33--
342.40.0
35
diff --git a/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb
index 1bf99d4907..b76f120ee1 100644
--- a/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb
+++ b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb
@@ -32,6 +32,7 @@ SRC_URI = "git://github.com/apache/nifi-minifi-cpp.git;branch=master;protocol=ht
32 file://0001-Fix-build-with-libc.patch \ 32 file://0001-Fix-build-with-libc.patch \
33 file://0001-civetweb-Disable-lto.patch \ 33 file://0001-civetweb-Disable-lto.patch \
34 file://0001-Add-missing-includes-cstdint-and-cstdio.patch \ 34 file://0001-Add-missing-includes-cstdint-and-cstdio.patch \
35 file://0001-Do-not-use-LFS64-functions-on-linux-musl.patch \
35 file://minifi.service \ 36 file://minifi.service \
36 file://systemd-volatile.conf \ 37 file://systemd-volatile.conf \
37 file://sysvinit-volatile.conf \ 38 file://sysvinit-volatile.conf \