[libcxx-commits] [PATCH] D96303: [SystemZ][ZOS] Guard using declaration for ::fchmodat

Zibi Sarbino via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 8 16:49:30 PST 2021

zibi created this revision.
zibi requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

The use of fchmodat() is beeing guarded but its using declaration is not. Let's use the same guard in both places to avoid compiler errors on platforms where `fchmodat` does not exist.

  rG LLVM Github Monorepo



Index: libcxx/src/filesystem/posix_compat.h
--- libcxx/src/filesystem/posix_compat.h
+++ libcxx/src/filesystem/posix_compat.h
@@ -487,7 +487,9 @@
 using ::chdir;
 using ::close;
 using ::fchmod;
+#if defined(AT_SYMLINK_NOFOLLOW) && defined(AT_FDCWD)
 using ::fchmodat;
 using ::fstat;
 using ::ftruncate;
 using ::getcwd;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96303.322242.patch
Type: text/x-patch
Size: 398 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210209/d31e8c37/attachment.bin>

More information about the libcxx-commits mailing list