added the check for sin6_scope_id
This commit is contained in:
parent
cad563503a
commit
ab062079d6
15
qse/configure
vendored
15
qse/configure
vendored
@ -18780,6 +18780,7 @@ _ACEOF
|
||||
fi
|
||||
|
||||
|
||||
|
||||
ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_ifindex" "ac_cv_member_struct_ifreq_ifr_ifindex" "#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#ifdef HAVE_NET_IF_H
|
||||
@ -18854,6 +18855,20 @@ _ACEOF
|
||||
fi
|
||||
|
||||
|
||||
ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_scope_id" "ac_cv_member_struct_sockaddr_in6_sin6_scope_id" "#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
"
|
||||
if test "x$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" = xyes; then :
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# The cast to long int works around a bug in the HP C Compiler
|
||||
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
|
||||
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
|
||||
|
@ -281,6 +281,7 @@ AC_CHECK_MEMBERS([struct stat.st_birthtim.tv_nsec])
|
||||
AC_CHECK_MEMBERS([struct stat.st_mtimespec.tv_nsec])
|
||||
AC_CHECK_MEMBERS([struct stat.st_birthtimespec.tv_nsec])
|
||||
|
||||
|
||||
AC_CHECK_MEMBERS([struct ifreq.ifr_ifindex, struct ifreq.ifr_mtu], [], [],
|
||||
[#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
@ -295,6 +296,11 @@ AC_CHECK_TYPES([struct lifconf, struct lifreq, struct if_laddrreq], [], [],
|
||||
#include <net/if.h>
|
||||
#endif])
|
||||
|
||||
AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id], [], [],
|
||||
[#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>])
|
||||
|
||||
dnl check the size of primitive data types
|
||||
AC_CHECK_SIZEOF(char,,[[]])
|
||||
AC_CHECK_SIZEOF(short,,[[]])
|
||||
|
@ -428,6 +428,9 @@
|
||||
/* Define to 1 if the system has the type `struct lifreq'. */
|
||||
#undef HAVE_STRUCT_LIFREQ
|
||||
|
||||
/* Define to 1 if `sin6_scope_id' is a member of `struct sockaddr_in6'. */
|
||||
#undef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID
|
||||
|
||||
/* Define to 1 if `st_birthtime' is a member of `struct stat'. */
|
||||
#undef HAVE_STRUCT_STAT_ST_BIRTHTIME
|
||||
|
||||
|
@ -95,7 +95,9 @@ static QSE_INLINE int skad_to_nwad (const sockaddr_t* skad, qse_nwad_t* nwad)
|
||||
QSE_MEMSET (nwad, 0, QSE_SIZEOF(*nwad));
|
||||
nwad->type = QSE_NWAD_IN6;
|
||||
QSE_MEMCPY (&nwad->u.in6.addr, &in->sin6_addr, QSE_SIZEOF(nwad->u.in6.addr));
|
||||
#if defined(HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID)
|
||||
nwad->u.in6.scope = in->sin6_scope_id;
|
||||
#endif
|
||||
nwad->u.in6.port = in->sin6_port;
|
||||
break;
|
||||
}
|
||||
@ -141,7 +143,9 @@ static QSE_INLINE int nwad_to_skad (const qse_nwad_t* nwad, sockaddr_t* skad)
|
||||
|
||||
in->sin6_family = AF_INET6;
|
||||
QSE_MEMCPY (&in->sin6_addr, &nwad->u.in6.addr, QSE_SIZEOF(nwad->u.in6.addr));
|
||||
#if defined(HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID)
|
||||
in->sin6_scope_id = nwad->u.in6.scope;
|
||||
#endif
|
||||
in->sin6_port = nwad->u.in6.port;
|
||||
#endif
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user