summaryrefslogtreecommitdiff
path: root/ext/libressl/crypto/compat/arc4random_fe310.h
diff options
context:
space:
mode:
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