From 54697b4bebf26e80d60e7a10d42fc5f4f00b9fdd Mon Sep 17 00:00:00 2001 From: Dima Krasner Date: Sun, 31 Jan 2016 21:56:03 +0200 Subject: aio: replace HAVE_SOCKETPAIR with HAVE_DUP in aio_cmd_ssl() --- jim-aio.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'jim-aio.c') diff --git a/jim-aio.c b/jim-aio.c index 0bfcccd..9463bda 100644 --- a/jim-aio.c +++ b/jim-aio.c @@ -1073,8 +1073,7 @@ static int aio_cmd_ssl(Jim_Interp *interp, int argc, Jim_Obj *const *argv) } fd = fileno(af->fp); - /* XXX: Why HAVE_SOCKETPAIR? */ -#if defined(HAVE_SOCKETPAIR) +#if defined(HAVE_DUP) fd = dup(fd); if (fd < 0) { return JIM_ERR; @@ -1087,7 +1086,7 @@ static int aio_cmd_ssl(Jim_Interp *interp, int argc, Jim_Obj *const *argv) ssl = SSL_new(ssl_ctx); if (ssl == NULL) { -#if defined(HAVE_SOCKETPAIR) +#if defined(HAVE_DUP) close(fd); #endif Jim_SetResultString(interp, ERR_error_string(ERR_get_error(), NULL), -1); @@ -1129,7 +1128,7 @@ static int aio_cmd_ssl(Jim_Interp *interp, int argc, Jim_Obj *const *argv) return JIM_OK; out: -#if defined(HAVE_SOCKETPAIR) +#if defined(HAVE_DUP) close(fd); #endif SSL_free(ssl); -- cgit v1.1