]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
libbsd: Fix build with largefile support
authorKhem Raj <raj.khem@gmail.com>
Wed, 21 Dec 2022 17:55:43 +0000 (09:55 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 22 Dec 2022 23:03:11 +0000 (23:03 +0000)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/recipes-support/libbsd/libbsd/0001-funopen-Replace-off64_t-with-off_t-in-funopen_seek.patch [new file with mode: 0644]
meta/recipes-support/libbsd/libbsd_0.11.7.bb

diff --git a/meta/recipes-support/libbsd/libbsd/0001-funopen-Replace-off64_t-with-off_t-in-funopen_seek.patch b/meta/recipes-support/libbsd/libbsd/0001-funopen-Replace-off64_t-with-off_t-in-funopen_seek.patch
new file mode 100644 (file)
index 0000000..45ecef0
--- /dev/null
@@ -0,0 +1,34 @@
+From 9c4e5f8984e46344c9e150764b8aa0a7a70b6cb5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 15 Dec 2022 09:02:22 -0800
+Subject: [PATCH] funopen: Replace off64_t with off_t in funopen_seek
+
+AC_SYS_LARGEFILE in configure.ac is setting needed defines to make
+64bit off_t on relevant platforms.
+
+Fixes build on musl
+
+| ../../../../../../../../workspace/sources/libbsd/src/funopen.c:68:28: error: unknown type name 'off64_t'; did you mean 'off_t'?
+| funopen_seek(void *cookie, off64_t *offset, int whence)
+|                            ^~~~~~~
+|                            off_t
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/libbsd/libbsd/-/merge_requests/24]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/funopen.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/funopen.c b/src/funopen.c
+index 1e6f43a..a9b40e8 100644
+--- a/src/funopen.c
++++ b/src/funopen.c
+@@ -65,7 +65,7 @@ funopen_write(void *cookie, const char *buf, size_t size)
+ }
+ static int
+-funopen_seek(void *cookie, off64_t *offset, int whence)
++funopen_seek(void *cookie, off_t *offset, int whence)
+ {
+       struct funopen_cookie *cookiewrap = cookie;
+       off_t soff = *offset;
index 7a1deed1f61416191b5243a7723d51703b4483ca..a9f7a00469fd2e017b7bd2b3561566b91185f8f5 100644 (file)
@@ -32,7 +32,9 @@ LICENSE:${PN} = "BSD-3-Clause & ISC & PD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=75e85c5a558f86d10fbd5abc567ea5e6"
 SECTION = "libs"
 
-SRC_URI = "https://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
+SRC_URI = "https://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+           file://0001-funopen-Replace-off64_t-with-off_t-in-funopen_seek.patch \
+           "
 
 SRC_URI[sha256sum] = "9baa186059ebbf25c06308e9f991fda31f7183c0f24931826d83aa6abd8a0261"