diff options
author | 2002-06-12 03:16:20 +0000 | |
---|---|---|
committer | 2002-06-12 03:16:20 +0000 | |
commit | 57ace22a9f7962d6ea3bb1bf3b150a997940d42b (patch) | |
tree | 45d652b5532fa801347c33e4e37221e5bac49da7 /lib/libc/gen/err.c | |
parent | sync (diff) | |
download | wireguard-openbsd-57ace22a9f7962d6ea3bb1bf3b150a997940d42b.tar.xz wireguard-openbsd-57ace22a9f7962d6ea3bb1bf3b150a997940d42b.zip |
__indr_reference() and the definition in the same compilation unit are
a bad idea. use __weak_alias(), but for now put the definition at the
bottom, since AUX_FUNC is not properly propagated to the weak definition,
and will cause grief to the linker. should fix vax.
tested by hin@ via LDSTATIC=-static, millert@ ok.
Diffstat (limited to 'lib/libc/gen/err.c')
-rw-r--r-- | lib/libc/gen/err.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/libc/gen/err.c b/lib/libc/gen/err.c index 2a25c0a08ca..6094f12a45d 100644 --- a/lib/libc/gen/err.c +++ b/lib/libc/gen/err.c @@ -32,19 +32,13 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: err.c,v 1.6 2002/06/08 04:52:55 fgsch Exp $"; +static char rcsid[] = "$OpenBSD: err.c,v 1.7 2002/06/12 03:16:20 fgsch Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> #include <err.h> #include <stdarg.h> -#ifdef __indr_reference -__indr_reference(_err, err); -#else -__weak_alias(err, _err); -#endif - __dead void _err(int eval, const char *fmt, ...) { @@ -54,3 +48,6 @@ _err(int eval, const char *fmt, ...) _verr(eval, fmt, ap); va_end(ap); } + +__weak_alias(err, _err); + |