Currently one would have to pass a `macos` flag explicitly to build on
OSX, but if we replace `macos` with `darwin` this happens automatically.
Signed-off-by: Tom Gundersen <teg@jklm.no>
The new crypt tests cannot be run on macOS. Making them conditional for
non-macOS platforms fixes running unit tests in the internal directory
on macOS.
Our current crypt implmentation requires glibc to be available on the
developer's system. But it is not strictly necessary, because I'd like
to run at least unit tests on mac. This PR makes it possible to compile
and run unit-tests on mac, but it will panic if someone tries to run
osbuild-composer on mac.
Newer gcc doesn't really like strncpy producing following warnings:
warning: ‘strncpy’ specified bound depends on the length of the source argument
I switched the function to the plain old strcpy as strncpy is not necessary anyway
because we allocate the destination buffer using size returned from strlen.