Fix compilation on Debian kFreeBSD.

The configure script correctly detects that utimensat() and futimens()
are missing but the headers define stub versions of the functions.
Including sys/stat.h pulls in the system definitions  so we can override
them safely.  Bug #1021.
This commit is contained in:
Todd C. Miller
2022-02-03 09:33:30 -07:00
parent a299406291
commit 2e957cd43d

View File

@@ -25,6 +25,7 @@
#define SUDO_COMPAT_H
#include <sys/types.h> /* for gid_t, mode_t, size_t, ssize_t, time_t, uid_t */
#include <sys/stat.h> /* to avoid problems with mismatched headers and libc */
#include <unistd.h> /* to avoid problems with mismatched headers and libc */
#include <stdio.h>
#if !defined(HAVE_VSNPRINTF) || !defined(HAVE_VASPRINTF) || \