diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-12-15 00:45:39 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-12-21 10:16:31 +0000 |
commit | 16931f42d0cf7c951ced94c2ae602db0280ada35 (patch) | |
tree | a9b063a8c481bc77898b4a8d49b379a1138c35d1 | |
parent | 337a23e0bd717b56b5996c83f503941b16ce1fd6 (diff) | |
download | poky-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.inc | 3 | ||||
-rw-r--r-- | meta/recipes-bsp/acpid/acpid/0001-Replace-stat64-with-stat.patch | 31 |
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" | |||
13 | SRC_URI = "${SOURCEFORGE_MIRROR}/acpid2/acpid-${PV}.tar.xz \ | 13 | SRC_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 | ||
18 | CVE_PRODUCT = "acpid2" | 19 | CVE_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 @@ | |||
1 | From 4b729235a9e96f120feee7e3746818aad0f3b924 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 14 Dec 2022 15:04:30 -0800 | ||
4 | Subject: [PATCH] Replace stat64 with stat | ||
5 | |||
6 | It already checks for largefile support in configure.ac via | ||
7 | AC_SYS_LARGEFILE macro, which will ensure that 64bit elements | ||
8 | are correctly setup for stat APIs on platforms needing large | ||
9 | file support. | ||
10 | |||
11 | Upstream-Status: Submitted [https://sourceforge.net/p/acpid2/code/merge-requests/5/] | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | sock.c | 4 ++-- | ||
15 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/sock.c b/sock.c | ||
18 | index 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 | } | ||