Skip to content

Commit 2a39809

Browse files
committed
Merging r367084:
------------------------------------------------------------------------ r367084 | kongyi | 2019-07-26 07:17:14 +0200 (Fri, 26 Jul 2019) | 6 lines Fix macOS build after r358716 COPYFILE_CLONE is only defined on newer macOS versions, using it without check breaks build on systems running legacy OS and toolchain. Differential Revision: https://reviews.llvm.org/D65317 ------------------------------------------------------------------------ llvm-svn: 368848
1 parent 82330f1 commit 2a39809

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Support/Unix/Path.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1200,7 +1200,7 @@ namespace fs {
12001200
/// implementation.
12011201
std::error_code copy_file(const Twine &From, const Twine &To) {
12021202
uint32_t Flag = COPYFILE_DATA;
1203-
#if __has_builtin(__builtin_available)
1203+
#if __has_builtin(__builtin_available) && defined(COPYFILE_CLONE)
12041204
if (__builtin_available(macos 10.12, *)) {
12051205
bool IsSymlink;
12061206
if (std::error_code Error = is_symlink_file(From, IsSymlink))

0 commit comments

Comments
 (0)