From bc42cc6fe784f36df225c44c93b74830027cb5a2 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Thu, 15 Jan 2015 03:08:29 +1100 Subject: kludge around tun API mismatch betterer --- openbsd-compat/port-tun.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'openbsd-compat/port-tun.c') diff --git a/openbsd-compat/port-tun.c b/openbsd-compat/port-tun.c index 7b58ea678..49e7b4d99 100644 --- a/openbsd-compat/port-tun.c +++ b/openbsd-compat/port-tun.c @@ -250,14 +250,18 @@ sys_tun_infilter(struct Channel *c, char *buf, int len) } u_char * -sys_tun_outfilter(struct Channel *c, u_char **data, size_t *dlen) +sys_tun_outfilter(struct Channel *c, u_char **data, u_int *dlen) { u_char *buf; u_int32_t *af; int r; + size_t xxx_dlen; - if ((r = sshbuf_get_string(&c->output, data, dlen)) != 0) + /* XXX new API is incompatible with this signature. */ + if ((r = sshbuf_get_string(&c->output, data, &xxx_dlen)) != 0) fatal("%s: buffer error: %s", __func__, ssh_err(r)); + if (dlen != NULL) + *dlen = xxx_dlen; if (*dlen < sizeof(*af)) return (NULL); buf = *data; -- cgit v1.2.3