Index: autoconf/configure.ac =================================================================== --- autoconf/configure.ac +++ autoconf/configure.ac @@ -1723,6 +1723,7 @@ AC_CHECK_HEADERS([dlfcn.h execinfo.h fcntl.h inttypes.h link.h]) AC_CHECK_HEADERS([malloc.h setjmp.h signal.h stdint.h termios.h unistd.h]) AC_CHECK_HEADERS([utime.h]) +AC_CHECK_HEADERS([sys/syscall.h]) AC_CHECK_HEADERS([sys/mman.h sys/param.h sys/resource.h sys/time.h sys/uio.h]) AC_CHECK_HEADERS([sys/ioctl.h malloc/malloc.h mach/mach.h]) AC_CHECK_HEADERS([valgrind/valgrind.h]) @@ -1804,6 +1805,7 @@ AC_CHECK_FUNCS([strtoll strtoq sysconf malloc_zone_statistics ]) AC_CHECK_FUNCS([setjmp longjmp sigsetjmp siglongjmp writev]) AC_CHECK_FUNCS([futimes futimens]) +AC_CHECK_FUNCS([syscall]) AC_C_PRINTF_A AC_FUNC_RAND48 Index: lib/Support/Unix/Path.inc =================================================================== --- lib/Support/Unix/Path.inc +++ lib/Support/Unix/Path.inc @@ -43,6 +43,9 @@ # if HAVE_NDIR_H # include # endif +# if HAVE_SYS_SYSCALL_H +# include +# endif #endif #ifdef __APPLE__ @@ -464,6 +467,14 @@ if (::futimes(FD, Times)) return error_code(errno, system_category()); return error_code::success(); +#elif defined(HAVE_SYSCALL) + timeval Times[2]; + Times[0].tv_sec = Time.toEpochTime(); + Times[0].tv_usec = 0; + Times[1] = Times[0]; + if (::syscall(__NR_utimensat, FD, 0, Times, 0)) + return error_code(errno, system_category()); + return error_code::success(); #else #warning Missing futimes() and futimens() return make_error_code(errc::not_supported);