diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libc/include/namespace.h | 18 | ||||
-rw-r--r-- | src/lib/libc/stdlib/hcreate.c | 3 |
2 files changed, 18 insertions, 3 deletions
diff --git a/src/lib/libc/include/namespace.h b/src/lib/libc/include/namespace.h index 939515251e..c8c864a266 100644 --- a/src/lib/libc/include/namespace.h +++ b/src/lib/libc/include/namespace.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: namespace.h,v 1.5 2015/09/06 20:26:20 guenther Exp $ */ | 1 | /* $OpenBSD: namespace.h,v 1.6 2015/09/10 18:13:46 guenther Exp $ */ |
2 | 2 | ||
3 | #ifndef _LIBC_NAMESPACE_H_ | 3 | #ifndef _LIBC_NAMESPACE_H_ |
4 | #define _LIBC_NAMESPACE_H_ | 4 | #define _LIBC_NAMESPACE_H_ |
@@ -126,6 +126,8 @@ | |||
126 | * ex: DEF_SYS(pread) | 126 | * ex: DEF_SYS(pread) |
127 | */ | 127 | */ |
128 | 128 | ||
129 | #include <sys/cdefs.h> /* for __dso_hidden and __{weak,strong}_alias */ | ||
130 | |||
129 | #define HIDDEN(x) _libc_##x | 131 | #define HIDDEN(x) _libc_##x |
130 | #define CANCEL(x) _libc_##x##_cancel | 132 | #define CANCEL(x) _libc_##x##_cancel |
131 | #define WRAP(x) _libc_##x##_wrap | 133 | #define WRAP(x) _libc_##x##_wrap |
@@ -144,5 +146,19 @@ | |||
144 | #define DEF_WRAP(x) __weak_alias(x, WRAP(x)) | 146 | #define DEF_WRAP(x) __weak_alias(x, WRAP(x)) |
145 | #define DEF_SYS(x) __strong_alias(_thread_sys_##x, HIDDEN(x)) | 147 | #define DEF_SYS(x) __strong_alias(_thread_sys_##x, HIDDEN(x)) |
146 | 148 | ||
149 | |||
150 | /* | ||
151 | * gcc will generate calls to the functions below. | ||
152 | * Declare and redirect them here so we always go | ||
153 | * directly to our hidden aliases. | ||
154 | */ | ||
155 | #include <sys/_types.h> | ||
156 | void *memcpy(void *__restrict, const void *__restrict, __size_t); | ||
157 | void *memset(void *, int, __size_t); | ||
158 | void __stack_smash_handler(const char [], int __attribute__((__unused__))); | ||
159 | PROTO_NORMAL(memcpy); | ||
160 | PROTO_NORMAL(memset); | ||
161 | PROTO_NORMAL(__stack_smash_handler); | ||
162 | |||
147 | #endif /* _LIBC_NAMESPACE_H_ */ | 163 | #endif /* _LIBC_NAMESPACE_H_ */ |
148 | 164 | ||
diff --git a/src/lib/libc/stdlib/hcreate.c b/src/lib/libc/stdlib/hcreate.c index d0a377010e..cb547a8d36 100644 --- a/src/lib/libc/stdlib/hcreate.c +++ b/src/lib/libc/stdlib/hcreate.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: hcreate.c,v 1.5 2014/08/10 02:15:18 guenther Exp $ */ | 1 | /* $OpenBSD: hcreate.c,v 1.6 2015/09/10 18:13:46 guenther Exp $ */ |
2 | /* $NetBSD: hcreate.c,v 1.5 2004/04/23 02:48:12 simonb Exp $ */ | 2 | /* $NetBSD: hcreate.c,v 1.5 2004/04/23 02:48:12 simonb Exp $ */ |
3 | 3 | ||
4 | /* | 4 | /* |
@@ -47,7 +47,6 @@ | |||
47 | * nobody had a copy in the office, so... | 47 | * nobody had a copy in the office, so... |
48 | */ | 48 | */ |
49 | 49 | ||
50 | #include "namespace.h" | ||
51 | #include <assert.h> | 50 | #include <assert.h> |
52 | #include <errno.h> | 51 | #include <errno.h> |
53 | #include <stdint.h> | 52 | #include <stdint.h> |