Skip to content

Commit

Permalink
Include time.h if missing utimensat() or futimens().
Browse files Browse the repository at this point in the history
Now that we declare these as taking a timespec array we cannot get
away with a simple forward declaration.
  • Loading branch information
millert committed Aug 13, 2024
1 parent e7483ae commit 6f8dfd9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/sudo_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
#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_UTIMENSAT) || !defined(HAVE_FUTIMENS)
# include <time.h>
#endif
#if !defined(HAVE_VSNPRINTF) || !defined(HAVE_VASPRINTF) || \
!defined(HAVE_VSYSLOG) || defined(PREFER_PORTABLE_SNPRINTF)
# include <stdarg.h>
Expand Down

0 comments on commit 6f8dfd9

Please sign in to comment.