Use ftruncate() as it's much more portable (#341)
commitc607ebf5e22757c0bd3822199941f2af0c5fb1fc
authorPhilip Prindeville <philipp@redfish-solutions.com>
Sun, 19 Aug 2018 14:00:20 +0000 (19 08:00 -0600)
committerJens Rantil <jens.rantil@gmail.com>
Sun, 19 Aug 2018 14:00:20 +0000 (19 16:00 +0200)
treefd5f93004e56139ff830d41f2fb8be588c074941
parentc17f5030177f689b37ddd6cd2237c96491f6c399
Use ftruncate() as it's much more portable (#341)

Embedded systems (such as OpenWRT) often have reduced functionality;
when operating in such circumstances, using the most widely available
API's (or subsets of API's) is key for portability.  ftruncate() is
much more ubiquitous than posix_fallocate().
linux.c