diff --git a/cmdline/portable.h b/cmdline/portable.h index 3c61125f..7b904a4d 100644 --- a/cmdline/portable.h +++ b/cmdline/portable.h @@ -123,6 +123,10 @@ #endif #endif +#if HAVE_MACH_MACH_TIME_H +#include +#endif + #if HAVE_DIRENT_H #include #define NAMLEN(dirent) strlen((dirent)->d_name) diff --git a/cmdline/unix.c b/cmdline/unix.c index be077775..8d086f9e 100644 --- a/cmdline/unix.c +++ b/cmdline/unix.c @@ -239,7 +239,7 @@ uint64_t tick(void) { #if HAVE_MACH_ABSOLUTE_TIME /* for Mac OS X */ - return match_absolute_time(); + return mach_absolute_time(); #elif HAVE_CLOCK_GETTIME && (defined(CLOCK_MONOTONIC) || defined(CLOCK_MONOTONIC_RAW)) /* for Linux */ struct timespec tv; diff --git a/configure.ac b/configure.ac index f42c4f66..8832ebc6 100644 --- a/configure.ac +++ b/configure.ac @@ -25,7 +25,7 @@ AC_HEADER_TIME AC_CHECK_HEADERS([fcntl.h stddef.h stdint.h stdlib.h string.h limits.h]) AC_CHECK_HEADERS([unistd.h getopt.h fnmatch.h io.h inttypes.h byteswap.h]) AC_CHECK_HEADERS([sys/time.h sys/file.h sys/ioctl.h sys/vfs.h sys/statfs.h sys/param.h sys/mount.h]) -AC_CHECK_HEADERS([linux/fiemap.h linux/fs.h]) +AC_CHECK_HEADERS([linux/fiemap.h linux/fs.h mach/mach_time.h]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST