Index: cmake/config-ix.cmake =================================================================== --- cmake/config-ix.cmake +++ cmake/config-ix.cmake @@ -7,7 +7,6 @@ include(CheckLibraryExists) include(CheckSymbolExists) include(CheckFunctionExists) -include(CheckStructHasMember) include(CheckCCompilerFlag) include(CheckCompilerVersion) @@ -249,11 +248,6 @@ endif() endif() -CHECK_STRUCT_HAS_MEMBER("struct stat" st_mtimespec.tv_nsec - "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC) -CHECK_STRUCT_HAS_MEMBER("struct stat" st_mtim.tv_nsec - "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC) - check_symbol_exists(__GLIBC__ stdio.h LLVM_USING_GLIBC) if( LLVM_USING_GLIBC ) add_definitions( -D_GNU_SOURCE ) Index: include/llvm/Config/config.h.cmake =================================================================== --- include/llvm/Config/config.h.cmake +++ include/llvm/Config/config.h.cmake @@ -208,12 +208,6 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_TIME_H ${HAVE_SYS_TIME_H} -/* Define to 1 if stat struct has st_mtimespec member .*/ -#cmakedefine HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC ${HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC} - -/* Define to 1 if stat struct has st_mtim member. */ -#cmakedefine HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC ${HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC} - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_TYPES_H ${HAVE_SYS_TYPES_H} Index: lib/Support/Unix/Path.inc =================================================================== --- lib/Support/Unix/Path.inc +++ lib/Support/Unix/Path.inc @@ -592,14 +592,12 @@ } uint32_t atime_nsec, mtime_nsec; -#if defined(HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC) +#ifdef __APPLE__ atime_nsec = Status.st_atimespec.tv_nsec; mtime_nsec = Status.st_mtimespec.tv_nsec; -#elif defined(HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC) +#else atime_nsec = Status.st_atim.tv_nsec; mtime_nsec = Status.st_mtim.tv_nsec; -#else - atime_nsec = mtime_nsec = 0; #endif perms Perms = static_cast(Status.st_mode) & all_perms;