mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 00:44:37 -06:00
Allow bypass of posix_fallocate with FPRIME_SYNTHETIC_FALLOCATE (#4380)
This commit is contained in:
parent
695478d1a1
commit
edf5c85d09
@ -165,7 +165,7 @@ PosixFile::Status PosixFile::preallocate(FwSizeType offset, FwSizeType length) {
|
||||
// this call is properly implemented. This code starts with a status of "NOT_SUPPORTED". When the standard is met
|
||||
// an attempt will be made to called posix_fallocate, and should that still return NOT_SUPPORTED then fallback
|
||||
// code is engaged to synthesize this behavior.
|
||||
#if _POSIX_C_SOURCE >= 200112L
|
||||
#if _POSIX_C_SOURCE >= 200112L && !(defined(FPRIME_SYNTHETIC_FALLOCATE) && FPRIME_SYNTHETIC_FALLOCATE)
|
||||
else {
|
||||
int errno_status =
|
||||
::posix_fallocate(this->m_handle.m_file_descriptor, static_cast<off_t>(offset), static_cast<off_t>(length));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user