diff --git a/configure.ac b/configure.ac index f7d6fe5f..53165d79 100644 --- a/configure.ac +++ b/configure.ac @@ -38,7 +38,11 @@ AC_TYPE_UINT32_T AC_TYPE_UINT64_T AC_TYPE_UINT8_T AC_TYPE_INT8_T -AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec, struct stat.st_mtimensec, struct stat.st_mtimespec.tv_nsec], [], [], [[#include ]]) +AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec, struct stat.st_mtimensec, struct stat.st_mtimespec.tv_nsec], [], [], [[ +#include +#include +#include +]]) dnl Checks for library functions. AC_SYS_LARGEFILE diff --git a/portable.h b/portable.h index 9f67d682..e4e5805f 100644 --- a/portable.h +++ b/portable.h @@ -125,9 +125,9 @@ #if HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC #define STAT_NSEC(st) (st)->st_mtim.tv_nsec /* Linux */ #elif HAVE_STRUCT_STAT_ST_MTIMENSEC -#define STAT_NSEC(st) (st)->st_mtimensec /* FreeBSD, Mac OS X if _POSIX_C_SOURCE defined */ +#define STAT_NSEC(st) (st)->st_mtimensec /* NetBSD */ #elif HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC -#define STAT_NSEC(st) (st)->st_mtimespec.tv_nsec /* Mac OS X if _POSIX_C_SOURCE not defined */ +#define STAT_NSEC(st) (st)->st_mtimespec.tv_nsec /* FreeBSD, Mac OS X */ #else /** * If nanoseconds are not supported, we report the special FILE_MTIME_NSEC_INVALID value,