From: Dmitry V. Levin Date: Wed, 22 Jun 2016 23:15:54 +0000 (+0000) Subject: Assume that libc provides struct sockaddr_in6.sin6_scope_id X-Git-Tag: v4.13~109 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0a3d0e5f494c1ee63fbb1fcf9f4a57cbaedeb4ed;p=strace 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. --- diff --git a/configure.ac b/configure.ac index 3aadc306..9afda736 100644 --- a/configure.ac +++ b/configure.ac @@ -350,11 +350,6 @@ AC_CHECK_MEMBERS([struct timex.tai],,, [#include ]) AC_CHECK_MEMBERS([struct utsname.domainname],,, [#include ]) -AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,, -[#include -#include -#include ]) - AC_CHECK_MEMBERS(m4_normalize([ struct stat.st_atime_nsec, struct stat.st_ctime_nsec, diff --git a/net.c b/net.c index 4f177f5f..517ed23c 100644 --- a/net.c +++ b/net.c @@ -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