Skip to content

Commit edf5c85

Browse files
authored
Allow bypass of posix_fallocate with FPRIME_SYNTHETIC_FALLOCATE (#4380)
1 parent 695478d commit edf5c85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Os/Posix/File.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ PosixFile::Status PosixFile::preallocate(FwSizeType offset, FwSizeType length) {
165165
// this call is properly implemented. This code starts with a status of "NOT_SUPPORTED". When the standard is met
166166
// an attempt will be made to called posix_fallocate, and should that still return NOT_SUPPORTED then fallback
167167
// code is engaged to synthesize this behavior.
168-
#if _POSIX_C_SOURCE >= 200112L
168+
#if _POSIX_C_SOURCE >= 200112L && !(defined(FPRIME_SYNTHETIC_FALLOCATE) && FPRIME_SYNTHETIC_FALLOCATE)
169169
else {
170170
int errno_status =
171171
::posix_fallocate(this->m_handle.m_file_descriptor, static_cast<off_t>(offset), static_cast<off_t>(length));

0 commit comments

Comments
 (0)