yann@766: Copyright 2008 Yann E. MORIN. yann@766: yann@766: This patch is needed to make gcc-4.3.1 able to build the Java frontend. yann@766: yann@766: Index: uClibc/libc/inet/ifaddrs.c yann@766: =================================================================== yann@766: --- uClibc/libc/inet/ifaddrs.c (revision 23002) yann@766: +++ uClibc/libc/inet/ifaddrs.c (working copy) yann@766: @@ -22,7 +22,7 @@ yann@766: #include yann@766: #include yann@766: #include yann@766: -#include "ifaddrs.h" yann@766: +#include yann@766: #include yann@766: #include yann@766: #include yann@766: Index: uClibc/libc/inet/ifaddrs.h yann@766: =================================================================== yann@766: --- uClibc/libc/inet/ifaddrs.h (revision 23002) yann@766: +++ uClibc/libc/inet/ifaddrs.h (working copy) yann@766: @@ -1,76 +0,0 @@ yann@766: -/* ifaddrs.h -- declarations for getting network interface addresses yann@766: - Copyright (C) 2002 Free Software Foundation, Inc. yann@766: - This file is part of the GNU C Library. yann@766: - yann@766: - The GNU C Library is free software; you can redistribute it and/or yann@766: - modify it under the terms of the GNU Lesser General Public yann@766: - License as published by the Free Software Foundation; either yann@766: - version 2.1 of the License, or (at your option) any later version. yann@766: - yann@766: - The GNU C Library is distributed in the hope that it will be useful, yann@766: - but WITHOUT ANY WARRANTY; without even the implied warranty of yann@766: - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU yann@766: - Lesser General Public License for more details. yann@766: - yann@766: - You should have received a copy of the GNU Lesser General Public yann@766: - License along with the GNU C Library; if not, write to the Free yann@766: - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA yann@766: - 02111-1307 USA. */ yann@766: - yann@766: -#ifndef _IFADDRS_H yann@766: -#define _IFADDRS_H 1 yann@766: - yann@766: -#include yann@766: -#include yann@766: -#include yann@766: -#include yann@766: - yann@766: -__BEGIN_DECLS yann@766: - yann@766: -/* The `getifaddrs' function generates a linked list of these structures. yann@766: - Each element of the list describes one network interface. */ yann@766: -struct ifaddrs yann@766: -{ yann@766: - struct ifaddrs *ifa_next; /* Pointer to the next structure. */ yann@766: - yann@766: - char *ifa_name; /* Name of this network interface. */ yann@766: - unsigned int ifa_flags; /* Flags as from SIOCGIFFLAGS ioctl. */ yann@766: - yann@766: - struct sockaddr *ifa_addr; /* Network address of this interface. */ yann@766: - struct sockaddr *ifa_netmask; /* Netmask of this interface. */ yann@766: - union yann@766: - { yann@766: - /* At most one of the following two is valid. If the IFF_BROADCAST yann@766: - bit is set in `ifa_flags', then `ifa_broadaddr' is valid. If the yann@766: - IFF_POINTOPOINT bit is set, then `ifa_dstaddr' is valid. yann@766: - It is never the case that both these bits are set at once. */ yann@766: - struct sockaddr *ifu_broadaddr; /* Broadcast address of this interface. */ yann@766: - struct sockaddr *ifu_dstaddr; /* Point-to-point destination address. */ yann@766: - } ifa_ifu; yann@766: - /* These very same macros are defined by for `struct ifaddr'. yann@766: - So if they are defined already, the existing definitions will be fine. */ yann@766: -# ifndef ifa_broadaddr yann@766: -# define ifa_broadaddr ifa_ifu.ifu_broadaddr yann@766: -# endif yann@766: -# ifndef ifa_dstaddr yann@766: -# define ifa_dstaddr ifa_ifu.ifu_dstaddr yann@766: -# endif yann@766: - yann@766: - void *ifa_data; /* Address-specific data (may be unused). */ yann@766: -}; yann@766: - yann@766: - yann@766: -/* Create a linked list of `struct ifaddrs' structures, one for each yann@766: - network interface on the host machine. If successful, store the yann@766: - list in *IFAP and return 0. On errors, return -1 and set `errno'. yann@766: - yann@766: - The storage returned in *IFAP is allocated dynamically and can yann@766: - only be properly freed by passing it to `freeifaddrs'. */ yann@766: -extern int getifaddrs (struct ifaddrs **__ifap) __THROW; yann@766: - yann@766: -/* Reclaim the storage allocated by a previous `getifaddrs' call. */ yann@766: -extern void freeifaddrs (struct ifaddrs *__ifa) __THROW; yann@766: - yann@766: -__END_DECLS yann@766: - yann@766: -#endif /* ifaddrs.h */ yann@766: Index: uClibc/libc/inet/getaddrinfo.c yann@766: =================================================================== yann@766: --- uClibc/libc/inet/getaddrinfo.c (revision 23002) yann@766: +++ uClibc/libc/inet/getaddrinfo.c (working copy) yann@766: @@ -68,7 +68,7 @@ yann@766: #include yann@766: #include yann@766: #include yann@766: -#include "ifaddrs.h" yann@766: +#include yann@766: yann@766: /* Experimentally off - libc_hidden_proto(memcpy) */ yann@766: /* Experimentally off - libc_hidden_proto(memset) */ yann@766: --- /dev/null 2008-08-04 09:44:45.624322752 +0200 yann@766: +++ uClibc/include/ifaddrs.h 2008-08-05 09:31:20.000000000 +0200 yann@766: @@ -0,0 +1,76 @@ yann@766: +/* ifaddrs.h -- declarations for getting network interface addresses yann@766: + Copyright (C) 2002 Free Software Foundation, Inc. yann@766: + This file is part of the GNU C Library. yann@766: + yann@766: + The GNU C Library is free software; you can redistribute it and/or yann@766: + modify it under the terms of the GNU Lesser General Public yann@766: + License as published by the Free Software Foundation; either yann@766: + version 2.1 of the License, or (at your option) any later version. yann@766: + yann@766: + The GNU C Library is distributed in the hope that it will be useful, yann@766: + but WITHOUT ANY WARRANTY; without even the implied warranty of yann@766: + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU yann@766: + Lesser General Public License for more details. yann@766: + yann@766: + You should have received a copy of the GNU Lesser General Public yann@766: + License along with the GNU C Library; if not, write to the Free yann@766: + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA yann@766: + 02111-1307 USA. */ yann@766: + yann@766: +#ifndef _IFADDRS_H yann@766: +#define _IFADDRS_H 1 yann@766: + yann@766: +#include yann@766: +#include yann@766: +#include yann@766: +#include yann@766: + yann@766: +__BEGIN_DECLS yann@766: + yann@766: +/* The `getifaddrs' function generates a linked list of these structures. yann@766: + Each element of the list describes one network interface. */ yann@766: +struct ifaddrs yann@766: +{ yann@766: + struct ifaddrs *ifa_next; /* Pointer to the next structure. */ yann@766: + yann@766: + char *ifa_name; /* Name of this network interface. */ yann@766: + unsigned int ifa_flags; /* Flags as from SIOCGIFFLAGS ioctl. */ yann@766: + yann@766: + struct sockaddr *ifa_addr; /* Network address of this interface. */ yann@766: + struct sockaddr *ifa_netmask; /* Netmask of this interface. */ yann@766: + union yann@766: + { yann@766: + /* At most one of the following two is valid. If the IFF_BROADCAST yann@766: + bit is set in `ifa_flags', then `ifa_broadaddr' is valid. If the yann@766: + IFF_POINTOPOINT bit is set, then `ifa_dstaddr' is valid. yann@766: + It is never the case that both these bits are set at once. */ yann@766: + struct sockaddr *ifu_broadaddr; /* Broadcast address of this interface. */ yann@766: + struct sockaddr *ifu_dstaddr; /* Point-to-point destination address. */ yann@766: + } ifa_ifu; yann@766: + /* These very same macros are defined by for `struct ifaddr'. yann@766: + So if they are defined already, the existing definitions will be fine. */ yann@766: +# ifndef ifa_broadaddr yann@766: +# define ifa_broadaddr ifa_ifu.ifu_broadaddr yann@766: +# endif yann@766: +# ifndef ifa_dstaddr yann@766: +# define ifa_dstaddr ifa_ifu.ifu_dstaddr yann@766: +# endif yann@766: + yann@766: + void *ifa_data; /* Address-specific data (may be unused). */ yann@766: +}; yann@766: + yann@766: + yann@766: +/* Create a linked list of `struct ifaddrs' structures, one for each yann@766: + network interface on the host machine. If successful, store the yann@766: + list in *IFAP and return 0. On errors, return -1 and set `errno'. yann@766: + yann@766: + The storage returned in *IFAP is allocated dynamically and can yann@766: + only be properly freed by passing it to `freeifaddrs'. */ yann@766: +extern int getifaddrs (struct ifaddrs **__ifap) __THROW; yann@766: + yann@766: +/* Reclaim the storage allocated by a previous `getifaddrs' call. */ yann@766: +extern void freeifaddrs (struct ifaddrs *__ifa) __THROW; yann@766: + yann@766: +__END_DECLS yann@766: + yann@766: +#endif /* ifaddrs.h */