From 35724e51548e17ed4af8bed121f9b89a603ff0e7 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 8 Jan 2019 10:18:54 +0000 Subject: [PATCH] PR libstdc++/88749 fix build failure in src/filesystem/ops.cc PR libstdc++/88749 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition to match the one that controls whether utimbuf and utime are declared. From-SVN: r267705 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/src/filesystem/ops.cc | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 0babce9a920..f3853f26bac 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2019-01-08 Jonathan Wakely + + PR libstdc++/88749 + * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition + to match the one that controls whether utimbuf and utime are declared. + 2019-01-07 Jonathan Wakely PR libstdc++/87787 diff --git a/libstdc++-v3/src/filesystem/ops.cc b/libstdc++-v3/src/filesystem/ops.cc index 369604da80f..41850b8fc57 100644 --- a/libstdc++-v3/src/filesystem/ops.cc +++ b/libstdc++-v3/src/filesystem/ops.cc @@ -41,7 +41,7 @@ # include // AT_FDCWD, AT_SYMLINK_NOFOLLOW #endif #ifdef _GLIBCXX_HAVE_SYS_STAT_H -# include // stat, utimensat, fchmodat +# include // stat, utimensat, fchmodat #endif #ifdef _GLIBCXX_HAVE_SYS_STATVFS_H # include // statvfs @@ -909,7 +909,7 @@ fs::last_write_time(const path& p __attribute__((__unused__)), ec.assign(errno, std::generic_category()); else ec.clear(); -#elif _GLIBCXX_HAVE_UTIME_H +#elif _GLIBCXX_USE_UTIME && _GLIBCXX_HAVE_SYS_STAT_H posix::utimbuf times; times.modtime = s.count(); times.actime = do_stat(p, ec, [](const auto& st) { return st.st_atime; }, -- 2.30.2