summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorinoguchi <>2019-07-11 10:37:28 +0000
committerinoguchi <>2019-07-11 10:37:28 +0000
commit8bdcdce4ae33e4cef15864c11df84176c17a095a (patch)
tree8bc569563fc200afe96534ed82e13aa55fac5bbf /src/lib
parent08667db6793faaf3c266211cea6452f53bcb4f0c (diff)
downloadopenbsd-8bdcdce4ae33e4cef15864c11df84176c17a095a.tar.gz
openbsd-8bdcdce4ae33e4cef15864c11df84176c17a095a.tar.bz2
openbsd-8bdcdce4ae33e4cef15864c11df84176c17a095a.zip
Using pthread_atfork instead of __register_atfork with uClibc on noMMU
uClibc on noMMU doesn't provide __register_atfork(). Reported by redbirdtek on Github issue. https://github.com/libressl-portable/portable/issues/538 ok bcook@
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/arc4random/arc4random_linux.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/arc4random/arc4random_linux.h b/src/lib/libcrypto/arc4random/arc4random_linux.h
index 879f966391..5e1cf34e6e 100644
--- a/src/lib/libcrypto/arc4random/arc4random_linux.h
+++ b/src/lib/libcrypto/arc4random/arc4random_linux.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: arc4random_linux.h,v 1.11 2016/06/30 12:19:51 bcook Exp $ */ 1/* $OpenBSD: arc4random_linux.h,v 1.12 2019/07/11 10:37:28 inoguchi Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1996, David Mazieres <dm@uun.org> 4 * Copyright (c) 1996, David Mazieres <dm@uun.org>
@@ -32,7 +32,7 @@ static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER;
32#define _ARC4_LOCK() pthread_mutex_lock(&arc4random_mtx) 32#define _ARC4_LOCK() pthread_mutex_lock(&arc4random_mtx)
33#define _ARC4_UNLOCK() pthread_mutex_unlock(&arc4random_mtx) 33#define _ARC4_UNLOCK() pthread_mutex_unlock(&arc4random_mtx)
34 34
35#ifdef __GLIBC__ 35#if defined(__GLIBC__) && !(defined(__UCLIBC__) && !defined(__ARCH_USE_MMU__))
36extern void *__dso_handle; 36extern void *__dso_handle;
37extern int __register_atfork(void (*)(void), void(*)(void), void (*)(void), void *); 37extern int __register_atfork(void (*)(void), void(*)(void), void (*)(void), void *);
38#define _ARC4_ATFORK(f) __register_atfork(NULL, NULL, (f), __dso_handle) 38#define _ARC4_ATFORK(f) __register_atfork(NULL, NULL, (f), __dso_handle)