This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Define missing __inet6_scopeid_pton internal function used by getaddrinfo
- From: Samuel Thibault <samuel dot thibault at ens-lyon dot org>
- To: libc-alpha at sourceware dot org
- Date: Thu, 3 Aug 2017 02:23:52 +0200
- Subject: [PATCH] Define missing __inet6_scopeid_pton internal function used by getaddrinfo
- Authentication-results: sourceware.org; auth=none
* posix/tst-rfc3484.c: Include <netinet/in.h> and <net/if.h>
(__inet6_scopeid_pton): New function.
Index: glibc-2.25/posix/tst-rfc3484.c
===================================================================
--- glibc-2.25.orig/posix/tst-rfc3484.c
+++ glibc-2.25/posix/tst-rfc3484.c
@@ -2,6 +2,8 @@
#include <stdio.h>
#include <ifaddrs.h>
#include <stdint.h>
+#include <netinet/in.h>
+#include <net/if.h>
/* Internal definitions used in the libc code. */
#define __getservbyname_r getservbyname_r
@@ -55,6 +57,15 @@ _res_hconf_init (void)
{
}
+int
+internal_function
+__inet6_scopeid_pton (const struct in6_addr *address, const char *scope,
+ uint32_t *result)
+{
+ *result = if_nametoindex(scope);
+ return 0;
+}
+
#undef USE_NSCD
#include "../sysdeps/posix/getaddrinfo.c"