From c2d03f7cca1009b7fde3fa1bedb342dad6de5469 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 10 Nov 2021 13:30:27 -0700 Subject: [PATCH] sudo_compat.h: include unistd.h regardless of OS type This helps to avoid issues with mismatched headers and libraries. --- include/sudo_compat.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/sudo_compat.h b/include/sudo_compat.h index 6839fdbca..8f3ad622b 100644 --- a/include/sudo_compat.h +++ b/include/sudo_compat.h @@ -25,9 +25,7 @@ #define SUDO_COMPAT_H #include /* for gid_t, mode_t, size_t, ssize_t, time_t, uid_t */ -#if defined(__hpux) && !defined(__LP64__) -# include /* for pread/pread64, and pwrite/pwrite64 */ -#endif +#include /* to avoid problems with mismatched headers and libc */ #include #if !defined(HAVE_VSNPRINTF) || !defined(HAVE_VASPRINTF) || \ !defined(HAVE_VSYSLOG) || defined(PREFER_PORTABLE_SNPRINTF)