diff options
-rw-r--r-- | src/lib/libc/include/thread_private.h | 5 | ||||
-rw-r--r-- | src/lib/libc/stdlib/malloc.c | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/libc/include/thread_private.h b/src/lib/libc/include/thread_private.h index 81caaaae68..b443e32e83 100644 --- a/src/lib/libc/include/thread_private.h +++ b/src/lib/libc/include/thread_private.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: thread_private.h,v 1.28 2016/09/01 10:41:02 otto Exp $ */ | 1 | /* $OpenBSD: thread_private.h,v 1.29 2016/10/15 18:24:40 guenther Exp $ */ |
2 | 2 | ||
3 | /* PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org> */ | 3 | /* PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org> */ |
4 | 4 | ||
@@ -9,6 +9,9 @@ | |||
9 | 9 | ||
10 | #define _MALLOC_MUTEXES 4 | 10 | #define _MALLOC_MUTEXES 4 |
11 | void _malloc_init(int); | 11 | void _malloc_init(int); |
12 | #ifdef __LIBC__ | ||
13 | PROTO_NORMAL(_malloc_init); | ||
14 | #endif /* __LIBC__ */ | ||
12 | 15 | ||
13 | /* | 16 | /* |
14 | * The callbacks needed by libc to handle the threaded case. | 17 | * The callbacks needed by libc to handle the threaded case. |
diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index dc32420ffc..7e7364f484 100644 --- a/src/lib/libc/stdlib/malloc.c +++ b/src/lib/libc/stdlib/malloc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: malloc.c,v 1.201 2016/10/14 17:33:36 otto Exp $ */ | 1 | /* $OpenBSD: malloc.c,v 1.202 2016/10/15 18:24:40 guenther Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek <otto@drijf.net> | 3 | * Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek <otto@drijf.net> |
4 | * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org> | 4 | * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org> |
@@ -1249,6 +1249,7 @@ _malloc_init(int from_rthreads) | |||
1249 | mprotect(&malloc_readonly, sizeof(malloc_readonly), PROT_READ); | 1249 | mprotect(&malloc_readonly, sizeof(malloc_readonly), PROT_READ); |
1250 | _MALLOC_UNLOCK(0); | 1250 | _MALLOC_UNLOCK(0); |
1251 | } | 1251 | } |
1252 | DEF_STRONG(_malloc_init); | ||
1252 | 1253 | ||
1253 | void * | 1254 | void * |
1254 | malloc(size_t size) | 1255 | malloc(size_t size) |