Create replacement time.h if needed.

Remove #ifdef HAVE_TIME_H wrapper.  ok djm@
This commit is contained in:
Darren Tucker
2025-09-05 17:55:33 +10:00
parent ea586edbcb
commit cd9ba068e3
3 changed files with 2 additions and 7 deletions

View File

@@ -512,7 +512,6 @@ AC_CHECK_HEADERS([ \
sys/sysmacros.h \
sys/timers.h \
sys/vfs.h \
time.h \
tmpdir.h \
ttyent.h \
ucred.h \
@@ -530,7 +529,7 @@ AC_CHECK_HEADERS([ \
# the equivalent file. This avoids having to wrap those includes in
# '#ifdef HAVE_FOO_H'. If we create any such headers, add the path to includes.
compatincludes=no
AC_CHECK_HEADERS([ifaddrs.h paths.h poll.h stdint.h sys/stat.h sys/time.h util.h], [], [
AC_CHECK_HEADERS([ifaddrs.h paths.h poll.h stdint.h sys/stat.h sys/time.h time.h util.h], [], [
compatincludes="`pwd`/openbsd-compat/include"
header="$compatincludes/$ac_header"
dir=`dirname "$header"`

View File

@@ -41,9 +41,7 @@
#include <string.h>
#include <pwd.h>
#include <netdb.h>
#ifdef HAVE_TIME_H
#include <time.h>
#endif
#include "loginrec.h"

View File

@@ -28,9 +28,7 @@
#include <netdb.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_TIME_H
# include <time.h>
#endif
#include <time.h>
#include <unistd.h>
#include "digest.h"