From 63bf0939492803c8cdae434793b48fff7f34948f Mon Sep 17 00:00:00 2001 From: Gerhard Rieger Date: Fri, 21 Jun 2013 17:17:57 +0200 Subject: [PATCH] Fixed use of old rfd1 component --- CHANGES | 5 ++++- xio-socks5.c | 4 ++-- xioopts.c | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index b7ffe09..7e24458 100644 --- a/CHANGES +++ b/CHANGES @@ -228,7 +228,10 @@ corrections: mixed directions socat_open sprintf overflow - fixed bidirectional UDP-LISTEN error + Fixed bidirectional UDP-LISTEN error + + Compilation failed under some non-Linux operating systems due to use + of old rfd1 component porting: Red Hat issue 1020203: configure checks fail with some compilers. diff --git a/xio-socks5.c b/xio-socks5.c index 3c234d5..9907974 100644 --- a/xio-socks5.c +++ b/xio-socks5.c @@ -146,7 +146,7 @@ static int xioopen_socks5_client(int argc, const char *argv[], #endif #if 0 - if (xfd->fd1 < 0) { + if (xfd->rfd < 0) { /* this cannot fork because we retrieved fork option above */ result = _xioopen_connect (xfd, @@ -166,7 +166,7 @@ static int xioopen_socks5_client(int argc, const char *argv[], default: return result; } - xfd->fd1 = xfd->wfd = xfd->fd; + xfd->rfd = xfd->wfd = xfd->fd; } else #endif xfd->dtype = XIODATA_STREAM; diff --git a/xioopts.c b/xioopts.c index 32c769e..6c231f4 100644 --- a/xioopts.c +++ b/xioopts.c @@ -4124,10 +4124,10 @@ mc:addr opt->desc = ODESC_ERROR; continue; } #else - if (Setsockopt(xfd->fd1, opt->desc->major, opt->desc->minor, + if (Setsockopt(xfd->rfd, opt->desc->major, opt->desc->minor, &ip4_mreqn.mreq, sizeof(ip4_mreqn.mreq)) < 0) { Error7("setsockopt(%d, %d, %d, {0x%08x,0x%08x}, "F_Zu"): %s", - xfd->fd1, opt->desc->major, opt->desc->minor, + xfd->rfd, opt->desc->major, opt->desc->minor, ip4_mreqn.mreq.imr_multiaddr, ip4_mreqn.mreq.imr_interface, sizeof(ip4_mreqn.mreq),