diff options
-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 | } | ||