diff options
Diffstat (limited to 'bridges/source/cpp_uno/shared/vtablefactory.cxx')
-rw-r--r-- | bridges/source/cpp_uno/shared/vtablefactory.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx b/bridges/source/cpp_uno/shared/vtablefactory.cxx index b049c7f1d333..830d899ea91a 100644 --- a/bridges/source/cpp_uno/shared/vtablefactory.cxx +++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx @@ -264,10 +264,18 @@ bool VtableFactory::createBlock(Block &block, sal_Int32 slotCount) const } unlink(tmpfname); delete[] tmpfname; +#if defined(HAVE_POSIX_FALLOCATE) int err = posix_fallocate(block.fd, 0, block.size); +#else + int err = ftruncate(block.fd, block.size); +#endif if (err != 0) { +#if defined(HAVE_POSIX_FALLOCATE) SAL_WARN("bridges", "posix_fallocate failed with code " << err); +#else + SAL_WARN("bridges", "truncation of executable memory area failed with code " << err); +#endif close(block.fd); block.fd = -1; break; |