mirror of
https://github.com/rofl0r/proxychains-ng
synced 2025-01-10 15:42:57 +08:00
Separate the detections of s6_addr16 and s6_addr32
This commit is contained in:
parent
7807321f09
commit
e20e0e8b5d
20
configure
vendored
20
configure
vendored
@ -141,13 +141,19 @@ if [ -z "$CC" ] ; then
|
|||||||
CC=cc
|
CC=cc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
check_compile 'whether netinet/in.h defines s6_addr16' "" \
|
for i in 16 32; do
|
||||||
'#include <netinet/in.h>\nint main(int a, char**c){struct in6_addr x={.s6_addr32[0]=a};return x.s6_addr16[0]; }' \
|
check_compile "whether netinet/in.h defines s6_addr$i" "" \
|
||||||
|| {
|
'#include <netinet/in.h>\nint main(int a, char**c){'"struct in6_addr x={.s6_addr$i[0]=a};return x.s6_addr$i[0];"' }' \
|
||||||
check_compile 'whether netinet/in.h defines __u6_addr.__u6_addr16' \
|
|| {
|
||||||
'-Ds6_addr16=__u6_addr.__u6_addr16 -Ds6_addr32=__u6_addr.__u6_addr32' \
|
check_compile "whether netinet/in.h defines __u6_addr.__u6_addr$i" \
|
||||||
'#include <netinet/in.h>\nint main(int a, char**c){struct in6_addr x={.s6_addr32[0]=a};return x.s6_addr16[0]; }'
|
"-Ds6_addr$i=__u6_addr.__u6_addr$i" \
|
||||||
}
|
'#include <netinet/in.h>\nint main(int a, char**c){'"struct in6_addr x={.s6_addr$i[0]=a};return x.s6_addr$i[0];"' }' || \
|
||||||
|
check_compile "whether netinet/in.h defines _S6_un._S6_u$i" \
|
||||||
|
"-Ds6_addr$i=_S6_un._S6_u$i" \
|
||||||
|
'#include <netinet/in.h>\nint main(int a, char**c){'"struct in6_addr x={.s6_addr$i[0]=a};return x.s6_addr$i[0];"' }' || \
|
||||||
|
OUR_CPPFLAGS="$OUR_CPPFLAGS -DNO_S6_ADDR$i"
|
||||||
|
}
|
||||||
|
done
|
||||||
|
|
||||||
check_define __OpenBSD__ && \
|
check_define __OpenBSD__ && \
|
||||||
check_compile_run 'whether OpenBSDs fclose() (illegally) calls close()' \
|
check_compile_run 'whether OpenBSDs fclose() (illegally) calls close()' \
|
||||||
|
@ -336,7 +336,7 @@ int close(int fd) {
|
|||||||
}
|
}
|
||||||
static int is_v4inv6(const struct in6_addr *a) {
|
static int is_v4inv6(const struct in6_addr *a) {
|
||||||
return a->s6_addr32[0] == 0 && a->s6_addr32[1] == 0 &&
|
return a->s6_addr32[0] == 0 && a->s6_addr32[1] == 0 &&
|
||||||
#ifdef IS_SOLARIS
|
#ifdef NO_S6_ADDR16
|
||||||
a->s6_addr[8] == 0 && a->s6_addr[9] == 0 && a->s6_addr[10] == 0xff && a->s6_addr[11] == 0xff;
|
a->s6_addr[8] == 0 && a->s6_addr[9] == 0 && a->s6_addr[10] == 0xff && a->s6_addr[11] == 0xff;
|
||||||
#else
|
#else
|
||||||
a->s6_addr16[4] == 0 && a->s6_addr16[5] == 0xffff;
|
a->s6_addr16[4] == 0 && a->s6_addr16[5] == 0xffff;
|
||||||
|
Loading…
Reference in New Issue
Block a user