Commit 35724e51 by Jonathan Wakely Committed by Jonathan Wakely

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
parent 1d005acc
2019-01-08 Jonathan Wakely <jwakely@redhat.com>
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 <jwakely@redhat.com> 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/87787 PR libstdc++/87787
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
# include <fcntl.h> // AT_FDCWD, AT_SYMLINK_NOFOLLOW # include <fcntl.h> // AT_FDCWD, AT_SYMLINK_NOFOLLOW
#endif #endif
#ifdef _GLIBCXX_HAVE_SYS_STAT_H #ifdef _GLIBCXX_HAVE_SYS_STAT_H
# include <sys/stat.h> // stat, utimensat, fchmodat # include <sys/stat.h> // stat, utimensat, fchmodat
#endif #endif
#ifdef _GLIBCXX_HAVE_SYS_STATVFS_H #ifdef _GLIBCXX_HAVE_SYS_STATVFS_H
# include <sys/statvfs.h> // statvfs # include <sys/statvfs.h> // statvfs
...@@ -909,7 +909,7 @@ fs::last_write_time(const path& p __attribute__((__unused__)), ...@@ -909,7 +909,7 @@ fs::last_write_time(const path& p __attribute__((__unused__)),
ec.assign(errno, std::generic_category()); ec.assign(errno, std::generic_category());
else else
ec.clear(); ec.clear();
#elif _GLIBCXX_HAVE_UTIME_H #elif _GLIBCXX_USE_UTIME && _GLIBCXX_HAVE_SYS_STAT_H
posix::utimbuf times; posix::utimbuf times;
times.modtime = s.count(); times.modtime = s.count();
times.actime = do_stat(p, ec, [](const auto& st) { return st.st_atime; }, times.actime = do_stat(p, ec, [](const auto& st) { return st.st_atime; },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment