Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame^] | 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 | } |