From 6f8dfd968663ef928ca3d847d1aa9c78d8863473 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 13 Aug 2024 10:19:26 -0600 Subject: [PATCH] Include time.h if missing utimensat() or futimens(). Now that we declare these as taking a timespec array we cannot get away with a simple forward declaration. --- include/sudo_compat.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/sudo_compat.h b/include/sudo_compat.h index c113560c3c..a26a575716 100644 --- a/include/sudo_compat.h +++ b/include/sudo_compat.h @@ -28,6 +28,9 @@ #include /* to avoid problems with mismatched headers and libc */ #include /* to avoid problems with mismatched headers and libc */ #include +#if !defined(HAVE_UTIMENSAT) || !defined(HAVE_FUTIMENS) +# include +#endif #if !defined(HAVE_VSNPRINTF) || !defined(HAVE_VASPRINTF) || \ !defined(HAVE_VSYSLOG) || defined(PREFER_PORTABLE_SNPRINTF) # include