diff options
author | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2021-12-17 12:03:17 +0000 |
---|---|---|
committer | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2021-12-17 12:03:17 +0000 |
commit | ac454a928e5fd4511477b6e325e6b0690519290a (patch) | |
tree | 3dbad4d9d9012a054ae5a4fb89fa9b82e87ec9d3 /lib | |
parent | 5a7fffb613fd0f759d950d650bc52b14aa400918 (diff) |
Declare pthread_atfork as weak to avoid a fatal error with LLVM 13
Fixes behavior with current clang, which marks the symbol as GLOBAL
instead of WEAK. LLVM change: https://reviews.llvm.org/D90108
base-gcc is unaffected. Keep asm(".weak") for gcc3 until a cleanup can
be tested there.
Initial diff from mortimer@, input and ok kettenis@, ok guenther@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/csu/crtbeginS.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/csu/crtbeginS.c b/lib/csu/crtbeginS.c index a4a7cd19fce..cfaf7e40609 100644 --- a/lib/csu/crtbeginS.c +++ b/lib/csu/crtbeginS.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crtbeginS.c,v 1.20 2019/01/09 16:42:38 visa Exp $ */ +/* $OpenBSD: crtbeginS.c,v 1.21 2021/12/17 12:03:16 jca Exp $ */ /* $NetBSD: crtbegin.c,v 1.1 1996/09/12 16:59:03 cgd Exp $ */ /* @@ -83,6 +83,8 @@ asm(".hidden atexit"); */ int _thread_atfork(void (*)(void), void (*)(void), void (*)(void), void *) __attribute__((weak)); +int pthread_atfork(void (*)(void), void (*)(void), void (*)(void)) + __attribute__((weak)); int pthread_atfork(void (*prep)(void), void (*parent)(void), void (*child)(void)) |