Assume that libc provides struct sockaddr_in6.sin6_scope_id

* configure.ac (AC_CHECK_MEMBERS): Remove
struct sockaddr_in6.sin6_scope_id.
* net.c (print_sockaddr_data_in6): Remove
HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID check.
This commit is contained in:
2016-06-22 23:15:54 +00:00
parent 42c5878867
commit 0a3d0e5f49
2 changed files with 2 additions and 9 deletions

View File

@ -350,11 +350,6 @@ AC_CHECK_MEMBERS([struct timex.tai],,, [#include <sys/timex.h>])
AC_CHECK_MEMBERS([struct utsname.domainname],,, [#include <sys/utsname.h>])
AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,,
[#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>])
AC_CHECK_MEMBERS(m4_normalize([
struct stat.st_atime_nsec,
struct stat.st_ctime_nsec,

6
net.c
View File

@ -159,16 +159,14 @@ print_sockaddr_data_in6(const void *const buf, const int addrlen)
", \"%s\", &sin6_addr), sin6_flowinfo=%u",
ntohs(sa_in6->sin6_port), string_addr,
sa_in6->sin6_flowinfo);
#ifdef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID
tprints(", sin6_scope_id=");
# if defined IN6_IS_ADDR_LINKLOCAL && defined IN6_IS_ADDR_MC_LINKLOCAL
#if defined IN6_IS_ADDR_LINKLOCAL && defined IN6_IS_ADDR_MC_LINKLOCAL
if (IN6_IS_ADDR_LINKLOCAL(&sa_in6->sin6_addr)
|| IN6_IS_ADDR_MC_LINKLOCAL(&sa_in6->sin6_addr))
print_ifindex(sa_in6->sin6_scope_id);
else
# endif
#endif
tprintf("%u", sa_in6->sin6_scope_id);
#endif /* HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID */
}
static void