changeset 13770:10775e14164a

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.
author Todd C. Miller <Todd.Miller@sudo.ws>
date Thu, 03 Feb 2022 09:33:30 -0700
parents c32620c9f115
children 19d109fb1420
files include/sudo_compat.h
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/include/sudo_compat.h	Wed Feb 02 08:32:44 2022 -0700
+++ b/include/sudo_compat.h	Thu Feb 03 09:33:30 2022 -0700
@@ -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) || \