From 32a4a5e6017df4eec3d6380beff5c7dca5077cb4 Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Sun, 3 Dec 2023 21:01:06 +0100 Subject: remove darwin from bsd filename --- core/crypto/rand_bsd.odin | 12 ++++++++++++ core/crypto/rand_darwin_and_bsd.odin | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 core/crypto/rand_bsd.odin delete mode 100644 core/crypto/rand_darwin_and_bsd.odin diff --git a/core/crypto/rand_bsd.odin b/core/crypto/rand_bsd.odin new file mode 100644 index 000000000..8e2be1d95 --- /dev/null +++ b/core/crypto/rand_bsd.odin @@ -0,0 +1,12 @@ +//+build freebsd, openbsd +package crypto + +foreign import libc "system:c" + +foreign libc { + arc4random_buf :: proc(buf: [^]byte, nbytes: uint) --- +} + +_rand_bytes :: proc(dst: []byte) { + arc4random_buf(raw_data(dst), len(dst)) +} diff --git a/core/crypto/rand_darwin_and_bsd.odin b/core/crypto/rand_darwin_and_bsd.odin deleted file mode 100644 index 8e2be1d95..000000000 --- a/core/crypto/rand_darwin_and_bsd.odin +++ /dev/null @@ -1,12 +0,0 @@ -//+build freebsd, openbsd -package crypto - -foreign import libc "system:c" - -foreign libc { - arc4random_buf :: proc(buf: [^]byte, nbytes: uint) --- -} - -_rand_bytes :: proc(dst: []byte) { - arc4random_buf(raw_data(dst), len(dst)) -} -- cgit v1.2.3