Fix problems with pedantic mode complaining about fsync
Fix problems with pedantic mode complaining about fsync

(which is POSIX-only)

benedictpaten/cactus,benedictpaten/cactus,benedictpaten/cactus,benedictpaten/cactus,benedictpaten/cactus