uClibc: fix scoped-IPv6-addresses in getnameinfo
[openwrt.git] / toolchain / uClibc / patches-0.9.33.2 / 133-inet6-scoped-getnameinfo.patch
1 --- a/libc/inet/resolv.c
2 +++ b/libc/inet/resolv.c
3 @@ -317,6 +317,7 @@
4  #include <sys/utsname.h>
5  #include <sys/un.h>
6  #include <sys/stat.h>
7 +#include <net/if.h>
8  #include <bits/uClibc_mutex.h>
9  #include "internal/parse_config.h"
10  
11 @@ -1861,7 +1862,6 @@
12                                         c = inet_ntop(AF_INET6,
13                                                 (const void *) &sin6p->sin6_addr,
14                                                 host, hostlen);
15 -#if 0
16                                         /* Does scope id need to be supported? */
17                                         uint32_t scopeid;
18                                         scopeid = sin6p->sin6_scope_id;
19 @@ -1898,7 +1898,6 @@
20                                                         return EAI_SYSTEM;
21                                                 memcpy(host + real_hostlen, scopebuf, scopelen + 1);
22                                         }
23 -#endif
24                                 }
25  #endif /* __UCLIBC_HAS_IPV6__ */
26  #if defined __UCLIBC_HAS_IPV4__