From: Jakub Jelinek Date: Thu, 11 Oct 2007 16:32:14 +0000 (+0000) Subject: * sysdeps/gnu/netinet/tcp.h: Include sys/socket.h if __USE_MISC. X-Git-Tag: cvs/fedora-glibc-20071011T1636 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d0b5557df8fee6b8c75b9d888af6d46bf824f2fe;p=thirdparty%2Fglibc.git * sysdeps/gnu/netinet/tcp.h: Include sys/socket.h if __USE_MISC. (struct tcp_md5sig): Change tcpm_addr type to struct sockaddr_storage. * inet/netinet/in.h: Don't include bits/socket.h. * sysdeps/unix/sysv/linux/bits/socket.h: Only check _SYS_SOCKET_H macro. * sysdeps/unix/bsd/bsd4.4/bits/socket.h: Likewise. 2007-10-11 Jakub Jelinek * sysdeps/gnu/netinet/tcp.h: Include sys/socket.h if __USE_MISC. (struct tcp_md5sig): Change tcpm_addr type to struct sockaddr_storage. * inet/netinet/in.h: Don't include bits/socket.h. * sysdeps/unix/sysv/linux/bits/socket.h: Only check _SYS_SOCKET_H macro. * sysdeps/unix/bsd/bsd4.4/bits/socket.h: Likewise. --- diff --git a/ChangeLog b/ChangeLog index 7ca024625da..dc3c817b295 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-10-11 Jakub Jelinek + + * sysdeps/gnu/netinet/tcp.h: Include sys/socket.h if __USE_MISC. + (struct tcp_md5sig): Change tcpm_addr type to struct sockaddr_storage. + + * inet/netinet/in.h: Don't include bits/socket.h. + * sysdeps/unix/sysv/linux/bits/socket.h: Only check _SYS_SOCKET_H + macro. + * sysdeps/unix/bsd/bsd4.4/bits/socket.h: Likewise. + 2007-10-10 Ulrich Drepper * locale/programs/locfile-token.h: Remove tok_elif, add tok_elifdef diff --git a/inet/netinet/in.h b/inet/netinet/in.h index 4fdc0fadf10..136619831a4 100644 --- a/inet/netinet/in.h +++ b/inet/netinet/in.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1991-2001, 2003, 2004, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1991-2001, 2003, 2004, 2006, 2007 + 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 @@ -211,9 +212,6 @@ extern const struct in6_addr in6addr_loopback; /* ::1 */ #define INET_ADDRSTRLEN 16 #define INET6_ADDRSTRLEN 46 -/* Get the definition of the macro to define the common sockaddr members. */ -#include - /* Structure describing an Internet socket address. */ struct sockaddr_in diff --git a/sysdeps/gnu/netinet/tcp.h b/sysdeps/gnu/netinet/tcp.h index 2ab2909f206..06e8414b58f 100644 --- a/sysdeps/gnu/netinet/tcp.h +++ b/sysdeps/gnu/netinet/tcp.h @@ -54,6 +54,7 @@ #ifdef __USE_MISC # include +# include # ifdef __FAVOR_BSD typedef u_int32_t tcp_seq; @@ -233,7 +234,7 @@ struct tcp_info struct tcp_md5sig { - struct __kernel_sockaddr_storage tcpm_addr; /* Address associated. */ + struct sockaddr_storage tcpm_addr; /* Address associated. */ u_int16_t __tcpm_pad1; /* Zero. */ u_int16_t tcpm_keylen; /* Key length. */ u_int32_t __tcpm_pad2; /* Zero. */ diff --git a/sysdeps/unix/bsd/bsd4.4/bits/socket.h b/sysdeps/unix/bsd/bsd4.4/bits/socket.h index f74603f948b..67db4d84698 100644 --- a/sysdeps/unix/bsd/bsd4.4/bits/socket.h +++ b/sysdeps/unix/bsd/bsd4.4/bits/socket.h @@ -20,7 +20,7 @@ #ifndef __BITS_SOCKET_H #define __BITS_SOCKET_H 1 -#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H +#ifndef _SYS_SOCKET_H # error "Never include directly; use instead." #endif diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h index 89a9106b2e1..11bb607d0d5 100644 --- a/sysdeps/unix/sysv/linux/bits/socket.h +++ b/sysdeps/unix/sysv/linux/bits/socket.h @@ -21,7 +21,7 @@ #ifndef __BITS_SOCKET_H #define __BITS_SOCKET_H -#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H +#ifndef _SYS_SOCKET_H # error "Never include directly; use instead." #endif