Skip to content

Commit

Permalink
* sysdeps/gnu/netinet/tcp.h: Include sys/socket.h if __USE_MISC.
Browse files Browse the repository at this point in the history
(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  <jakub@redhat.com>

	* 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.
  • Loading branch information
Jakub Jelinek committed Oct 11, 2007
1 parent 3a054d7 commit d0b5557
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
2007-10-11 Jakub Jelinek <jakub@redhat.com>

* 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 <drepper@redhat.com>

* locale/programs/locfile-token.h: Remove tok_elif, add tok_elifdef
Expand Down
6 changes: 2 additions & 4 deletions inet/netinet/in.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 <bits/socket.h>


/* Structure describing an Internet socket address. */
struct sockaddr_in
Expand Down
3 changes: 2 additions & 1 deletion sysdeps/gnu/netinet/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@

#ifdef __USE_MISC
# include <sys/types.h>
# include <sys/socket.h>

# ifdef __FAVOR_BSD
typedef u_int32_t tcp_seq;
Expand Down Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion sysdeps/unix/bsd/bsd4.4/bits/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <bits/socket.h> directly; use <sys/socket.h> instead."
#endif

Expand Down
2 changes: 1 addition & 1 deletion sysdeps/unix/sysv/linux/bits/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <bits/socket.h> directly; use <sys/socket.h> instead."
#endif

Expand Down

0 comments on commit d0b5557

Please sign in to comment.