Commit graph

4 commits

Author SHA1 Message Date
Tom Gundersen
bca53a596c crypt: add automatic darwin support
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>
2020-07-17 07:48:22 +02:00
Martin Sehnoutka
aab8a4d305 crypt: make it possible to compile and test 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.
2020-01-30 14:42:25 +01:00
Ondřej Budai
189b2b4547 crypt: fix gcc warning
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.
2019-10-31 21:46:39 +01:00
Ondřej Budai
5b0c2cac9f Import crypt library
Copied from b3e2912865/crypt_r.go

Original sources are under MIT license
2019-10-31 21:46:39 +01:00