Skip to content

Commit 6f8dfd9

Browse files
committed
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.
1 parent e7483ae commit 6f8dfd9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

include/sudo_compat.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
#include <sys/stat.h> /* to avoid problems with mismatched headers and libc */
2929
#include <unistd.h> /* to avoid problems with mismatched headers and libc */
3030
#include <stdio.h>
31+
#if !defined(HAVE_UTIMENSAT) || !defined(HAVE_FUTIMENS)
32+
# include <time.h>
33+
#endif
3134
#if !defined(HAVE_VSNPRINTF) || !defined(HAVE_VASPRINTF) || \
3235
!defined(HAVE_VSYSLOG) || defined(PREFER_PORTABLE_SNPRINTF)
3336
# include <stdarg.h>

0 commit comments

Comments
 (0)