diff options
author | 2004-01-08 04:07:54 +0000 | |
---|---|---|
committer | 2004-01-08 04:07:54 +0000 | |
commit | 083fce061f493f3a1b8b76e6de0e8102c1502d11 (patch) | |
tree | 786474710d496e8eb8287a2a3914d9af68abeddc /lib/libc | |
parent | add dirhash sysctls (diff) | |
download | wireguard-openbsd-083fce061f493f3a1b8b76e6de0e8102c1502d11.tar.xz wireguard-openbsd-083fce061f493f3a1b8b76e6de0e8102c1502d11.zip |
use va_copy() with gcc 3 and up.
ok millert@ espie@
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/auth_subr.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/libc/gen/auth_subr.c b/lib/libc/gen/auth_subr.c index 01953267aad..d935985792b 100644 --- a/lib/libc/gen/auth_subr.c +++ b/lib/libc/gen/auth_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth_subr.c,v 1.23 2003/06/11 21:03:10 deraadt Exp $ */ +/* $OpenBSD: auth_subr.c,v 1.24 2004/01/08 04:07:54 brad Exp $ */ /*- * Copyright (c) 1995,1996,1997 Berkeley Software Design, Inc. @@ -129,7 +129,13 @@ static va_list nilap; * Quick one liners that only exist to keep auth_session_t opaque */ void auth_setstate(auth_session_t *as, int s){ as->state = s; } -void auth_set_va_list(auth_session_t *as, va_list ap) { as->ap = ap; } +void auth_set_va_list(auth_session_t *as, va_list ap) { +#if defined(__GNUC__) && __GNUC__ >= 3 + va_copy(as->ap, ap); +#else + as->ap = ap; +#endif +} int auth_getstate(auth_session_t *as) { return (as->state); } struct passwd *auth_getpwd(auth_session_t *as) { return (as->pwd); } |