2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 09:57:41 +00:00

sudo_compat.h: include unistd.h regardless of OS type

This helps to avoid issues with mismatched headers and libraries.
This commit is contained in:
Todd C. Miller 2021-11-10 13:30:27 -07:00
parent 55d17eaa34
commit c2d03f7cca

View File

@ -25,9 +25,7 @@
#define SUDO_COMPAT_H
#include <sys/types.h> /* for gid_t, mode_t, size_t, ssize_t, time_t, uid_t */
#if defined(__hpux) && !defined(__LP64__)
# include <unistd.h> /* for pread/pread64, and pwrite/pwrite64 */
#endif
#include <unistd.h> /* to avoid problems with mismatched headers and libc */
#include <stdio.h>
#if !defined(HAVE_VSNPRINTF) || !defined(HAVE_VASPRINTF) || \
!defined(HAVE_VSYSLOG) || defined(PREFER_PORTABLE_SNPRINTF)