diff options
author | Jens Hamisch <jens@Strawberry.COM> | 2001-04-27 19:00:36 +0200 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-04-30 12:29:21 +0000 |
commit | af130d4569250a70a5454519dc1efae1a891ab62 (patch) | |
tree | 751a7d7ce54a2a684ef0e5a816fe974fcc065aaf /perlio.c | |
parent | 7e92b0959fb4c0f54fe954a74d712d3cd54b1d9b (diff) | |
download | perl-af130d4569250a70a5454519dc1efae1a891ab62.tar.gz |
Re: [ID 20010303.009] SOCKS5 work around breaks other sockets
Message-ID: <20010427170036.K1372@Strawberry.COM>
SOCKS5_VERSION_NAME is the right symbol to detect
the presence of SOCKS5. (HAS_SOCKS5_INIT is telling whether
function called socks5_init() is available, and even that is
not universal, most SOCKS5 installations use SOCKSinit()).
p4raw-id: //depot/perl@9914
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2187,13 +2187,13 @@ IV PerlIOStdio_close(PerlIO *f) { dTHX; -#ifdef HAS_SOCKS5_INIT +#ifdef SOCKS5_VERSION_NAME int optval; Sock_size_t optlen = sizeof(int); #endif FILE *stdio = PerlIOSelf(f,PerlIOStdio)->stdio; return( -#ifdef HAS_SOCKS5_INIT +#ifdef SOCKS5_VERSION_NAME (getsockopt(PerlIO_fileno(f), SOL_SOCKET, SO_TYPE, (void *)&optval, &optlen) < 0) ? PerlSIO_fclose(stdio) : close(PerlIO_fileno(f)) |