summaryrefslogtreecommitdiff
path: root/ext/libressl/crypto/compat/arc4random_fe310.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2022-02-02 06:25:38 +0100
committerUros Majstorovic <majstor@majstor.org>2022-02-02 06:25:38 +0100
commit378d4ce7552df580e3ddd89c2faa9f8c5086d646 (patch)
tree36fe323de93de5d6b8fb27827fc57984c5b15f6d /ext/libressl/crypto/compat/arc4random_fe310.h
parent9d775a05562d6166a5142d9820ffa7c26de55d6c (diff)
renamed crypto -> ext
Diffstat (limited to 'ext/libressl/crypto/compat/arc4random_fe310.h')
-rw-r--r--ext/libressl/crypto/compat/arc4random_fe310.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/ext/libressl/crypto/compat/arc4random_fe310.h b/ext/libressl/crypto/compat/arc4random_fe310.h
new file mode 100644
index 0000000..131b0d3
--- /dev/null
+++ b/ext/libressl/crypto/compat/arc4random_fe310.h
@@ -0,0 +1,27 @@
+#define _ARC4_LOCK() ;
+#define _ARC4_UNLOCK() ;
+
+static inline void
+_getentropy_fail(void)
+{
+ _exit(1);
+}
+
+static inline void
+_rs_forkdetect(void)
+{
+}
+
+int arc4random_alloc(void **rsp, size_t rsp_size, void **rsxp, size_t rsxp_size);
+
+static inline int
+_rs_allocate(struct _rs **rsp, struct _rsx **rsxp)
+{
+ return arc4random_alloc((void **)rsp, sizeof(**rsp), (void **)rsxp, sizeof(**rsxp));
+}
+
+void arc4random_close(void)
+{
+ rs = NULL;
+ rsx = NULL;
+} \ No newline at end of file