On Thu, 2008-04-03 at 21:39 +1200, Amos Jeffries wrote: > ------------------------------------------------------------ > revno: 8912 > committer: Amos Jeffries <[EMAIL PROTECTED]> > branch nick: trunk > timestamp: Thu 2008-04-03 21:39:06 +1200 > message: > Attempted fix for FreeBSD run-time socket error "(22) Invalid Object" on > connects
This fix did not help. Amos, do you have a FreeBSD system to test this on (squid-cache.org, for example)? If not, it would be nice to undo all the changes that broke FreeBSD connect because it is getting increasingly more difficult to cherrypick which trunk commits to undo. I understand that you were trying to fix a Linux leak but I think a completely broken connect on FreeBSD trumps a leak on Linux, especially in trunk/. FWIW, I have attached the relevant configure output with the latest fix. I am not sure at all, but it feels like you are missing some #includes in the test cases. Thank you, Alex.
configure:23105: checking for ss_len field in struct sockaddr_storage configure:23135: gcc -c -Wall -g conftest.c >&5 configure:23141: $? = 0 configure:23158: result: yes configure:23174: checking for sin_len field in struct sockaddr_in configure:23204: gcc -c -Wall -g conftest.c >&5 conftest.c: In function `main': conftest.c:52: error: storage size of 's' isn't known conftest.c:52: warning: unused variable `s' configure:23210: $? = 1 configure: failed program was: | /* confdefs.h. */ | #define PACKAGE_NAME "Squid Web Proxy" | #define PACKAGE_TARNAME "squid" | #define PACKAGE_VERSION "3.HEAD-BZR" | #define PACKAGE_STRING "Squid Web Proxy 3.HEAD-BZR" | #define PACKAGE_BUGREPORT "http://www.squid-cache.org/bugs/" | #define PACKAGE "squid" | #define VERSION "3.HEAD-BZR" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_LIBDL 1 | #define HAVE_DLERROR 1 | #define CACHE_HTTP_PORT 3128 | #define CACHE_ICP_PORT 3130 | #define CONFIG_HOST_TYPE "i386-unknown-freebsd5.5" | #define SQUID_CONFIGURE_OPTIONS " '--prefix=/usr/local/squid3' '--enable-icap-client' '--disable-optimizations'" | #define _SQUID_INLINE_ | #define USE_CARP 1 | #define USE_SQUID_ESI 0 | #define ICAP_CLIENT 1 | #define USE_WCCP 1 | #define USE_WCCPv2 1 | #define SQUID_SNMP 1 | #define USE_HTCP 1 | #define HTTP_VIOLATIONS 1 | #define USE_IDENT 1 | #define DISABLE_POOLS 0 | #define USE_UNLINKD 1 | #define USE_IPV6 0 | #define IPV6_SPECIAL_SPLITSTACK 0 | #define IPV6_SPECIAL_LOCALHOST 0 | #define IPV6_SPECIAL_V4MAPPING 0 | #define DNS_CNAME 0 | #define HAVE_SS_LEN_IN_SS 1 | /* end confdefs.h. */ | | #include <sys/types.h> | #include <sys/socket.h> | | int | main () | { | struct sockaddr_in s; s.sin_len = 1; | ; | return 0; | } configure:23227: result: no configure:23243: checking for sin6_len field in struct sockaddr_in6 configure:23273: gcc -c -Wall -g conftest.c >&5 conftest.c: In function `main': conftest.c:53: error: storage size of 's' isn't known conftest.c:53: warning: unused variable `s' configure:23279: $? = 1 configure: failed program was: | /* confdefs.h. */ | #define PACKAGE_NAME "Squid Web Proxy" | #define PACKAGE_TARNAME "squid" | #define PACKAGE_VERSION "3.HEAD-BZR" | #define PACKAGE_STRING "Squid Web Proxy 3.HEAD-BZR" | #define PACKAGE_BUGREPORT "http://www.squid-cache.org/bugs/" | #define PACKAGE "squid" | #define VERSION "3.HEAD-BZR" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_LIBDL 1 | #define HAVE_DLERROR 1 | #define CACHE_HTTP_PORT 3128 | #define CACHE_ICP_PORT 3130 | #define CONFIG_HOST_TYPE "i386-unknown-freebsd5.5" | #define SQUID_CONFIGURE_OPTIONS " '--prefix=/usr/local/squid3' '--enable-icap-client' '--disable-optimizations'" | #define _SQUID_INLINE_ | #define USE_CARP 1 | #define USE_SQUID_ESI 0 | #define ICAP_CLIENT 1 | #define USE_WCCP 1 | #define USE_WCCPv2 1 | #define SQUID_SNMP 1 | #define USE_HTCP 1 | #define HTTP_VIOLATIONS 1 | #define USE_IDENT 1 | #define DISABLE_POOLS 0 | #define USE_UNLINKD 1 | #define USE_IPV6 0 | #define IPV6_SPECIAL_SPLITSTACK 0 | #define IPV6_SPECIAL_LOCALHOST 0 | #define IPV6_SPECIAL_V4MAPPING 0 | #define DNS_CNAME 0 | #define HAVE_SS_LEN_IN_SS 1 | #define HAVE_SIN_LEN_IN_SAI 0 | /* end confdefs.h. */ | | #include <sys/types.h> | #include <sys/socket.h> | | int | main () | { | struct sockaddr_in6 s; s.sin6_len = 1; | ; | return 0; | } configure:23296: result: no
