aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-01-08 10:18:54 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2019-01-08 10:18:54 +0000
commit35724e51548e17ed4af8bed121f9b89a603ff0e7 (patch)
tree509e8e2cde5d6f17965dd792c3aa88ed07a219e1 /libstdc++-v3
parent1d005accead139fc5bbe4970573e0a5ad1c4777d (diff)
downloadgcc-35724e51548e17ed4af8bed121f9b89a603ff0e7.zip
gcc-35724e51548e17ed4af8bed121f9b89a603ff0e7.tar.gz
gcc-35724e51548e17ed4af8bed121f9b89a603ff0e7.tar.bz2
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
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/src/filesystem/ops.cc4
2 files changed, 8 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 0babce9..f3853f2 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,9 @@
+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>
PR libstdc++/87787
diff --git a/libstdc++-v3/src/filesystem/ops.cc b/libstdc++-v3/src/filesystem/ops.cc
index 369604d..41850b8 100644
--- a/libstdc++-v3/src/filesystem/ops.cc
+++ b/libstdc++-v3/src/filesystem/ops.cc
@@ -41,7 +41,7 @@
# include <fcntl.h> // AT_FDCWD, AT_SYMLINK_NOFOLLOW
#endif
#ifdef _GLIBCXX_HAVE_SYS_STAT_H
-# include <sys/stat.h> // stat, utimensat, fchmodat
+# include <sys/stat.h> // stat, utimensat, fchmodat
#endif
#ifdef _GLIBCXX_HAVE_SYS_STATVFS_H
# include <sys/statvfs.h> // 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; },