new file mode 100644
@@ -0,0 +1,39 @@
+From c4f85268da6c30b0aec3d9a0e951b2088887cff4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 22 May 2023 18:35:37 -0700
+Subject: [PATCH] cow.c: Replace stat64 with stat
+
+LFS64 is deprecated in latest musl and this fails to build
+therefore switch to using stat API which is same as stat64 these days
+
+Upstream-Status: Inappropriate [No upstream]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ moo/cow.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/moo/cow.c b/moo/cow.c
+index 3951642..739d5ab 100644
+--- a/moo/cow.c
++++ b/moo/cow.c
+@@ -161,7 +161,7 @@ int write_cow_header(char *cow_file, int fd, char *backing_file,
+ int sectorsize, int alignment, long long *size)
+ {
+ struct cow_header_v3 *header;
+- struct stat64 buf;
++ struct stat buf;
+ int err;
+
+ err = cow_seek_file(fd, 0);
+@@ -192,7 +192,7 @@ int write_cow_header(char *cow_file, int fd, char *backing_file,
+ backing_file))
+ goto out_free;
+
+- err = stat64(header->backing_file, &buf);
++ err = stat(header->backing_file, &buf);
+ if(err < 0){
+ cow_printf("Stat of backing file '%s' failed, errno = %d\n",
+ header->backing_file, errno);
+--
+2.40.1
+
@@ -8,6 +8,7 @@ SRC_URI = "http://downloads.sourceforge.net/project/user-mode-linux/tools/1/uml_
file://unstrip.patch \
file://0001-include-required-system-header-files-for-fd_set-and-.patch \
file://0001-Add-missing-standard-headers-for-str-and-exit-APIs.patch \
+ file://0001-cow.c-Replace-stat64-with-stat.patch \
"
SRC_URI[md5sum] = "2c1ccd9efacbfb39e42d482b89b2550a"
SRC_URI[sha256sum] = "4f179b1db021ef15ac7e9b2eed57c525db127a754c574f591c367460cded9f41"
@@ -19,11 +20,11 @@ S = "${WORKDIR}/tools"
inherit update-alternatives
do_compile() {
- oe_runmake LIB_DIR=${libdir}/uml
+ oe_runmake LIB_DIR=${libdir}/uml CFLAGS="${CFLAGS}"
}
do_install() {
- oe_runmake install DESTDIR=${D} LIB_DIR=${libdir}/uml
+ oe_runmake install DESTDIR=${D} LIB_DIR=${libdir}/uml CFLAGS="${CFLAGS}"
}
FILES:${PN} += "${libdir}/uml"
Fixes WARNING: uml-utilities-20040406-r1 do_package_qa: QA Issue: File /usr/lib/uml/.debug/port-helper in package uml-utilities-dbg contains reference to TMPDIR Signed-off-by: Khem Raj <raj.khem@gmail.com> --- .../0001-cow.c-Replace-stat64-with-stat.patch | 39 +++++++++++++++++++ .../uml-utilities/uml-utilities_20040406.bb | 5 ++- 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 meta-oe/recipes-extended/uml-utilities/uml-utilities-20040406/0001-cow.c-Replace-stat64-with-stat.patch