From: Khem Raj Date: Thu, 15 Dec 2022 08:45:39 +0000 (-0800) Subject: acpid: Fix largefile enabled build X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~2257 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e25a7717594f1536d5053a54540593970ef2f7e5;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git acpid: Fix largefile enabled build Signed-off-by: Khem Raj Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-bsp/acpid/acpid.inc b/meta/recipes-bsp/acpid/acpid.inc index 98910bab29d..7b2f1c71c59 100644 --- a/meta/recipes-bsp/acpid/acpid.inc +++ b/meta/recipes-bsp/acpid/acpid.inc @@ -13,7 +13,8 @@ LICENSE = "GPL-2.0-or-later" SRC_URI = "${SOURCEFORGE_MIRROR}/acpid2/acpid-${PV}.tar.xz \ file://init \ file://acpid.service \ - " + file://0001-Replace-stat64-with-stat.patch \ + " CVE_PRODUCT = "acpid2" diff --git a/meta/recipes-bsp/acpid/acpid/0001-Replace-stat64-with-stat.patch b/meta/recipes-bsp/acpid/acpid/0001-Replace-stat64-with-stat.patch new file mode 100644 index 00000000000..10abfc83880 --- /dev/null +++ b/meta/recipes-bsp/acpid/acpid/0001-Replace-stat64-with-stat.patch @@ -0,0 +1,31 @@ +From 4b729235a9e96f120feee7e3746818aad0f3b924 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 14 Dec 2022 15:04:30 -0800 +Subject: [PATCH] Replace stat64 with stat + +It already checks for largefile support in configure.ac via +AC_SYS_LARGEFILE macro, which will ensure that 64bit elements +are correctly setup for stat APIs on platforms needing large +file support. + +Upstream-Status: Submitted [https://sourceforge.net/p/acpid2/code/merge-requests/5/] +Signed-off-by: Khem Raj +--- + sock.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sock.c b/sock.c +index 9e04501..3121fb7 100644 +--- a/sock.c ++++ b/sock.c +@@ -54,8 +54,8 @@ int non_root_clients; + static int + isfdtype(int fd, int fdtype) + { +- struct stat64 st; +- if (fstat64(fd, &st) != 0) ++ struct stat st; ++ if (fstat(fd, &st) != 0) + return -1; + return ((st.st_mode & S_IFMT) == (mode_t)fdtype); + }