Use HAVE_SYS_TIME_H and TIME_WITH_SYS_TIME from autoconf where possible

This commit is contained in:
Darryl L. Miles
2025-07-27 12:43:04 -04:00
committed by R. Timothy Edwards
parent 957904a389
commit 046401cbd8
17 changed files with 63 additions and 10 deletions
+9 -3
View File
@@ -28,9 +28,15 @@ static const char rcsid[] __attribute__ ((unused)) ="$Header: /usr/cvsroot/magic
#include <ctype.h>
#include <sys/types.h>
#include <arpa/inet.h> /* for htons() */
#include <time.h> /* since C89 */
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
#include "utils/magic.h"