Skip to content

Commit 9276126

Browse files
committed
fix build on other darwin platforms
1 parent 7779882 commit 9276126

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

llvm/lib/CAS/OnDiskCommon.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,14 @@ Expected<size_t> cas::ondisk::preallocateFileTail(int FD, size_t CurrentSize,
107107
fstore_t FAlloc;
108108
FAlloc.fst_flags = F_ALLOCATEALL;
109109
#if defined(F_ALLOCATEPERSIST) && \
110-
defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \
111-
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 130000
110+
((defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \
111+
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 130000) || \
112+
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \
113+
__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 160000) || \
114+
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && \
115+
__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 90000) || \
116+
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && \
117+
__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 160000))
112118
// F_ALLOCATEPERSIST is introduced in macOS 13.
113119
FAlloc.fst_flags |= F_ALLOCATEPERSIST;
114120
#endif

0 commit comments

Comments
 (0)