From 84248221bb261b433a10e69c32f6627ece2237ec Mon Sep 17 00:00:00 2001 From: inoguchi <> Date: Thu, 11 Jul 2019 10:37:28 +0000 Subject: [PATCH] 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@ --- src/lib/libcrypto/arc4random/arc4random_linux.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/libcrypto/arc4random/arc4random_linux.h b/src/lib/libcrypto/arc4random/arc4random_linux.h index 879f9663..5e1cf34e 100644 --- a/src/lib/libcrypto/arc4random/arc4random_linux.h +++ b/src/lib/libcrypto/arc4random/arc4random_linux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: arc4random_linux.h,v 1.11 2016/06/30 12:19:51 bcook Exp $ */ +/* $OpenBSD: arc4random_linux.h,v 1.12 2019/07/11 10:37:28 inoguchi Exp $ */ /* * Copyright (c) 1996, David Mazieres @@ -32,7 +32,7 @@ static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER; #define _ARC4_LOCK() pthread_mutex_lock(&arc4random_mtx) #define _ARC4_UNLOCK() pthread_mutex_unlock(&arc4random_mtx) -#ifdef __GLIBC__ +#if defined(__GLIBC__) && !(defined(__UCLIBC__) && !defined(__ARCH_USE_MMU__)) extern void *__dso_handle; extern int __register_atfork(void (*)(void), void(*)(void), void (*)(void), void *); #define _ARC4_ATFORK(f) __register_atfork(NULL, NULL, (f), __dso_handle)