From 6107639e64c25983ebfa93a2f1cb4f5924c18618 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 16 Jan 2008 19:47:17 +0000 Subject: [PATCH] * sysdeps/posix/getaddrinfo.c (default_labels): Adjust for change of names of in in6_addr. (default_precedence): Likewise. * sysdeps/unix/sysv/linux/cmsg_nxthdr.c: Include for NULL definition. --- ChangeLog | 5 ++ sysdeps/posix/getaddrinfo.c | 104 +++++++++++++++++----------------- sysdeps/unix/sysv/linux/cmsg_nxthdr.c | 3 +- 3 files changed, 59 insertions(+), 53 deletions(-) diff --git a/ChangeLog b/ChangeLog index 55ebe93..385313f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,11 @@ * sysdeps/unix/sysv/linux/bits/in.h: Likewise. * sysdeps/unix/sysv/linux/bits/socket.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/bits/stat.h: Likewise. + * sysdeps/posix/getaddrinfo.c (default_labels): Adjust for change + of names of in in6_addr. + (default_precedence): Likewise. + * sysdeps/unix/sysv/linux/cmsg_nxthdr.c: Include for + NULL definition. 2008-01-15 Ulrich Drepper diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index 8746725..fb18bba 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -1105,22 +1105,22 @@ static const struct prefixentry *labels; static const struct prefixentry default_labels[] = { /* See RFC 3484 for the details. */ - { { .in6_u - = { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 } } }, - 128, 0 }, - { { .in6_u - = { .u6_addr8 = { 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } }, - 16, 2 }, - { { .in6_u - = { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } }, - 96, 3 }, - { { .in6_u - = { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } } }, - 96, 4 }, + { { .__in6_u + = { .__u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 } } + }, 128, 0 }, + { { .__in6_u + = { .__u6_addr8 = { 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } + }, 16, 2 }, + { { .__in6_u + = { .__u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } + }, 96, 3 }, + { { .__in6_u + = { .__u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } } + }, 96, 4 }, /* The next two entries differ from RFC 3484. We need to treat IPv6 site-local addresses special because they are never NATed, unlike site-locale IPv4 addresses. If this would not happen, on @@ -1128,23 +1128,23 @@ static const struct prefixentry default_labels[] = sorting would prefer the IPv6 site-local addresses, causing unnecessary delays when trying to connect to a global IPv6 address through a site-local IPv6 address. */ - { { .in6_u - = { .u6_addr8 = { 0xfe, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } }, - 10, 5 }, - { { .in6_u - = { .u6_addr8 = { 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } }, - 7, 6 }, + { { .__in6_u + = { .__u6_addr8 = { 0xfe, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } + }, 10, 5 }, + { { .__in6_u + = { .__u6_addr8 = { 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } + }, 7, 6 }, /* Additional rule for Teredo tunnels. */ - { { .in6_u - = { .u6_addr8 = { 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } }, - 32, 7 }, - { { .in6_u - = { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } }, - 0, 1 } + { { .__in6_u + = { .__u6_addr8 = { 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } + }, 32, 7 }, + { { .__in6_u + = { .__u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } + }, 0, 1 } }; @@ -1155,26 +1155,26 @@ static const struct prefixentry *precedence; static const struct prefixentry default_precedence[] = { /* See RFC 3484 for the details. */ - { { .in6_u - = { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 } } }, - 128, 50 }, - { { .in6_u - = { .u6_addr8 = { 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } }, - 16, 30 }, - { { .in6_u - = { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } }, - 96, 20 }, - { { .in6_u - = { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } } }, - 96, 10 }, - { { .in6_u - = { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } }, - 0, 40 } + { { .__in6_u + = { .__u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 } } + }, 128, 50 }, + { { .__in6_u + = { .__u6_addr8 = { 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } + }, 16, 30 }, + { { .__in6_u + = { .__u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } + }, 96, 20 }, + { { .__in6_u + = { .__u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } } + }, 96, 10 }, + { { .__in6_u + = { .__u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } + }, 0, 40 } }; diff --git a/sysdeps/unix/sysv/linux/cmsg_nxthdr.c b/sysdeps/unix/sysv/linux/cmsg_nxthdr.c index b7de285..466af05 100644 --- a/sysdeps/unix/sysv/linux/cmsg_nxthdr.c +++ b/sysdeps/unix/sysv/linux/cmsg_nxthdr.c @@ -1,5 +1,5 @@ /* Return point to next ancillary data entry in message header. - Copyright (C) 1997, 1998, 2001 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2001, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include -- 2.7.4