diff options
author | Darren Tucker <dtucker@zip.com.au> | 2016-07-15 14:48:30 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2016-07-15 14:54:16 +1000 |
commit | 5abfb15ced985c340359ae7fb65a625ed3692b3e (patch) | |
tree | bcde17550f213403000237c99a541ec43cae38b1 /sshbuf-getput-basic.c | |
parent | 832b7443b7a8e181c95898bc5d73497b7190decd (diff) |
Move VA_COPY macro into compat header.
Some AIX compilers unconditionally undefine va_copy but don't set it back
to an internal function, causing link errors. In some compat code we
already use VA_COPY instead so move the two existing instances into the
shared header and use for sshbuf-getput-basic.c too. Should fix building
with at lease some versions of AIX's compiler. bz#2589, ok djm@
Diffstat (limited to 'sshbuf-getput-basic.c')
-rw-r--r-- | sshbuf-getput-basic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sshbuf-getput-basic.c b/sshbuf-getput-basic.c index ad21ae57..74c49be7 100644 --- a/sshbuf-getput-basic.c +++ b/sshbuf-getput-basic.c @@ -270,7 +270,7 @@ sshbuf_putfv(struct sshbuf *buf, const char *fmt, va_list ap) int r, len; u_char *p; - va_copy(ap2, ap); + VA_COPY(ap2, ap); if ((len = vsnprintf(NULL, 0, fmt, ap2)) < 0) { r = SSH_ERR_INVALID_ARGUMENT; goto out; @@ -280,7 +280,7 @@ sshbuf_putfv(struct sshbuf *buf, const char *fmt, va_list ap) goto out; /* Nothing to do */ } va_end(ap2); - va_copy(ap2, ap); + VA_COPY(ap2, ap); if ((r = sshbuf_reserve(buf, (size_t)len + 1, &p)) < 0) goto out; if ((r = vsnprintf((char *)p, len + 1, fmt, ap2)) != len) { |