svm: Use ftruncate to expand svm on FreeBSD 91/40391/2
authorTom Jones <[email protected]>
Wed, 31 Jan 2024 10:44:14 +0000 (10:44 +0000)
committerFlorin Coras <[email protected]>
Fri, 23 Feb 2024 18:48:29 +0000 (18:48 +0000)
commiteceef16b5c5963ed27aa16b2ead4654b5a7dd391
tree545fc8d3004f550f04a7c7ccb8877b82fbe3f668
parentb613d411a4c76ca69b1a57d239ec617d1e4f410e
svm: Use ftruncate to expand svm on FreeBSD

Linux doesn't support the Linux idiom of using lseek and a write to set
the size of a file, instead use ftruncate to accomplish the same effect.

This change is taken from the Nanoteq VPP port commit:
https://github.com/ftk-ntq/vpp/commit/04a1b19b37e791accc61b91f3f413d8bc8b1ff8f

Type: improvement
Change-Id: Ie0b83e751b8b8f20b6814e5c9f760035747dfad9
Signed-off-by: Tom Jones <[email protected]>
src/svm/svm.c