The 1st commit fixes a few small bugs around mkstemp.
The 2nd commit makes a small change needed to make swanstation compile on FreeBSD.
Ideally, all of swanstation would use feature testing, as the current OS testing is less portable and a lot more laborious and brittle, but for now this PR adds feature testing to fix compilation on FreeBSD.
The 1st commit fixes a few small bugs around mkstemp. The 2nd commit makes a small change needed to make swanstation compile on FreeBSD.
Ideally, all of swanstation would use feature testing, as the current OS testing is less portable and a lot more laborious and brittle, but for now this PR adds feature testing to fix compilation on FreeBSD.