From a0bcbc84f2e13e1585553d9b7dddd10b055d5275 Mon Sep 17 00:00:00 2001 From: christos Date: Tue, 14 Jul 2020 21:48:29 +0000 Subject: fix static build on NetBSD --- shells/tcsh/distinfo | 3 ++- shells/tcsh/patches/patch-tc.alloc.c | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 shells/tcsh/patches/patch-tc.alloc.c diff --git a/shells/tcsh/distinfo b/shells/tcsh/distinfo index 9168ad55aae..e69efdc0596 100644 --- a/shells/tcsh/distinfo +++ b/shells/tcsh/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.45 2020/07/08 04:06:48 mrg Exp $ +$NetBSD: distinfo,v 1.46 2020/07/14 21:48:29 christos Exp $ SHA1 (tcsh-6.22.02.tar.gz) = d3c916c82eec7e20c49dedf660edd51a7971f8ab RMD160 (tcsh-6.22.02.tar.gz) = f6c7d6521e1e092dd2c68727e45fbadd54af82e4 @@ -9,3 +9,4 @@ SHA1 (patch-ab) = 715d939e8a8f4917bd219dccd91d5c49ae502939 SHA1 (patch-configure) = 6970c041a66910325d1fb53ebf8ab3627d764778 SHA1 (patch-nls_Makefile.in) = 58d859e8a50e6436b9bc6514497eb876426d92d7 SHA1 (patch-sh.h) = ac6211ddd5e552e9baec2d35aed5e7e573cab04e +SHA1 (patch-tc.alloc.c) = 14c19c860b1a963428cce77b23df4a250abd4561 diff --git a/shells/tcsh/patches/patch-tc.alloc.c b/shells/tcsh/patches/patch-tc.alloc.c new file mode 100644 index 00000000000..d62b53528dd --- /dev/null +++ b/shells/tcsh/patches/patch-tc.alloc.c @@ -0,0 +1,20 @@ +$NetBSD: patch-tc.alloc.c,v 1.3 2020/07/14 21:48:30 christos Exp $ + +Fix static linking since NetBSD's libc needs these for pthread_atfork(); + +--- tc.alloc.c.orig 2019-12-04 12:51:54.000000000 -0500 ++++ tc.alloc.c 2020-07-14 17:42:39.103744313 -0400 +@@ -655,3 +655,13 @@ + USE(c); + USE(v); + } ++ ++#ifndef SYSMALLOC ++/* jemalloc defines these */ ++void _malloc_prefork(void); ++void _malloc_postfork(void); ++void _malloc_postfork_child(void); ++void _malloc_prefork(void) {} ++void _malloc_postfork(void) {} ++void _malloc_postfork_child(void) {} ++#endif -- cgit v1.2.3