Package: tsocks Version: 1.8beta5-3 Severity: normal Tags: patch Since upstream is pretty much dead, I was wondering if you could include this patch so it at least doesn't get lost. It's to include -lresolv on systems that need it for inet_aton() (eg, SunOS).
This is in turn needed because inet_addr returns -1 for addresses (or netmasks) of 255.255.255.255, which is interpreted as an error, since *mutter* *mutter* inet_addr() is such a poor interface that chose to return status results that are within the legal result space. It's best to use inet_aton instead of the deprecated inet_addr where possible, and although lacking in documentation, that often resides in libresolv, not libnsl or the libraries included by default when compiling under linux. #### --- /scuzzie/root/apt-source/tsocks-1.8beta5.defaultfallthrough/configure.in Tue Jul 16 08:51:03 2002 +++ /home/tconnors/install/tsocks-1.8beta5.defaultfallthrough/configure.in Mon Feb 19 19:31:39 2007 @@ -103,10 +103,12 @@ dnl Check for a function to convert an ascii ip address dnl to a sin_addr. AC_CHECK_FUNC(inet_aton, AC_DEFINE(HAVE_INET_ATON), [ - AC_CHECK_FUNC(inet_addr, AC_DEFINE(HAVE_INET_ADDR), [ - AC_CHECK_LIB(nsl, inet_addr, [ AC_DEFINE(HAVE_INET_ADDR) + AC_CHECK_LIB(resolv, inet_aton, [ AC_DEFINE(HAVE_INET_ATON) + LIBS="${LIBS} -lresolv -lnsl" ], [ + AC_CHECK_FUNC(inet_addr, AC_DEFINE(HAVE_INET_ADDR), [ + AC_CHECK_LIB(nsl, inet_addr, [ AC_DEFINE(HAVE_INET_ADDR) LIBS="${LIBS} -lnsl" ], [ - AC_MSG_ERROR("Neither inet_aton or inet_addr present")])])]) + AC_MSG_ERROR("Neither inet_aton or inet_addr present")])])])]) dnl Look for gethostbyname (needed by tsocks and inspectsocks) AC_CHECK_FUNC(gethostbyname, AC_DEFINE(HAVE_GETHOSTBYNAME), [ #### If libresolv is required, I'm pretty sure libnsl is also required, so I've included them both in $LIBS -- not including libnsl bails at link stage with: Undefined first referenced symbol in file gethostbyname common.o (symbol belongs to implicit dependency /usr/lib/libnsl.so.1) inet_addr common.o (symbol belongs to implicit dependency /usr/lib/libnsl.so.1) inet_ntoa common.o (symbol belongs to implicit dependency /usr/lib/libnsl.so.1) I can't work out the magic autoconf foo required in order to include them both only when necessary -- it ought to first check for the requirement of libresolv for inet_aton(), define HAVE_INET_ATON if found it or if there anyway. Then search for requirement of libnsl for inet_addr (which is still needed by common.o despite now being ifdeffed out in parser.c), but don't set HAVE_INET_ADDR in this case (or fix the logic in the code to use INET_ATON in preference to INET_ADDR -- probably worthwhile doing anyway). Some careful thinking would have to be done in order to get this correct -- and careful thinking ain't for me tonight. Ta. -- System Information: Debian Release: 4.0 APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.12.3 Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1) Versions of packages tsocks depends on: ii libc6 2.3.6.ds1-11 GNU C Library: Shared libraries tsocks recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]