summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-12-15 00:45:39 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-21 10:16:31 +0000
commit16931f42d0cf7c951ced94c2ae602db0280ada35 (patch)
treea9b063a8c481bc77898b4a8d49b379a1138c35d1
parent337a23e0bd717b56b5996c83f503941b16ce1fd6 (diff)
downloadpoky-16931f42d0cf7c951ced94c2ae602db0280ada35.tar.gz
acpid: Fix largefile enabled build
(From OE-Core rev: e25a7717594f1536d5053a54540593970ef2f7e5) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-bsp/acpid/acpid.inc3
-rw-r--r--meta/recipes-bsp/acpid/acpid/0001-Replace-stat64-with-stat.patch31
2 files changed, 33 insertions, 1 deletions
diff --git a/meta/recipes-bsp/acpid/acpid.inc b/meta/recipes-bsp/acpid/acpid.inc
index 98910bab29..7b2f1c71c5 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"
13SRC_URI = "${SOURCEFORGE_MIRROR}/acpid2/acpid-${PV}.tar.xz \ 13SRC_URI = "${SOURCEFORGE_MIRROR}/acpid2/acpid-${PV}.tar.xz \
14 file://init \ 14 file://init \
15 file://acpid.service \ 15 file://acpid.service \
16 " 16 file://0001-Replace-stat64-with-stat.patch \
17 "
17 18
18CVE_PRODUCT = "acpid2" 19CVE_PRODUCT = "acpid2"
19 20
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 0000000000..10abfc8388
--- /dev/null
+++ b/meta/recipes-bsp/acpid/acpid/0001-Replace-stat64-with-stat.patch
@@ -0,0 +1,31 @@
1From 4b729235a9e96f120feee7e3746818aad0f3b924 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 14 Dec 2022 15:04:30 -0800
4Subject: [PATCH] Replace stat64 with stat
5
6It already checks for largefile support in configure.ac via
7AC_SYS_LARGEFILE macro, which will ensure that 64bit elements
8are correctly setup for stat APIs on platforms needing large
9file support.
10
11Upstream-Status: Submitted [https://sourceforge.net/p/acpid2/code/merge-requests/5/]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 sock.c | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/sock.c b/sock.c
18index 9e04501..3121fb7 100644
19--- a/sock.c
20+++ b/sock.c
21@@ -54,8 +54,8 @@ int non_root_clients;
22 static int
23 isfdtype(int fd, int fdtype)
24 {
25- struct stat64 st;
26- if (fstat64(fd, &st) != 0)
27+ struct stat st;
28+ if (fstat(fd, &st) != 0)
29 return -1;
30 return ((st.st_mode & S_IFMT) == (mode_t)fdtype);
31 }