# --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../linux-header/if.patch.disabled # Copyright (C) 2004 - 2006 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- SDE-COPYRIGHT-NOTE-END --- ifmap is already defined in net/if.h - so disable most parts of the file for user-space applications. - Rene Rebe <rene@exactcode.de> --- usr/include/linux/if.h.orig 2004-10-03 22:50:13.954411344 +0200 +++ usr/include/linux/if.h 2004-10-03 23:16:24.702621320 +0200 @@ -26,6 +26,10 @@ #define IFNAMSIZ 16 #include <linux/hdlc/ioctl.h> +/* WARNING: userspace should use net/if.h, but this file may be included via + linux/mii.h as example */ +#if !defined(_NET_IF_H) || !defined(__USE_MISC) + /* Standard interface flags (netdevice->flags). */ #define IFF_UP 0x1 /* interface is up */ #define IFF_BROADCAST 0x2 /* broadcast address valid */ @@ -53,6 +57,8 @@ #define IFF_802_1Q_VLAN 0x1 /* 802.1Q VLAN device. */ #define IFF_EBRIDGE 0x2 /* Ethernet bridging device. */ +#endif /* !(net/if.h && __USE_MISC) */ + #define IF_GET_IFACE 0x0001 /* for querying only */ #define IF_GET_PROTO 0x0002 @@ -80,6 +86,9 @@ #define IF_PROTO_FR_ETH_PVC 0x200B #define IF_PROTO_RAW 0x200C /* RAW Socket */ +/* WARNING: userspace should use net/if.h, but this file may be included via + linux/mii.h as example */ +#if !defined(_NET_IF_H) || !defined(__USE_MISC) /* * Device mapping structure. I'd just gone off and designed a @@ -101,6 +110,7 @@ unsigned char port; /* 3 bytes spare */ }; +#endif /* !(net/if.h && __USE_MISC) */ struct if_settings { @@ -120,6 +130,7 @@ } ifs_ifsu; }; +#if !defined(_NET_IF_H) || !defined(__USE_MISC) /* * Interface request structure used for socket * ioctl's. All interface ioctl's must have parameter @@ -186,8 +197,10 @@ struct ifreq __user *ifcu_req; } ifc_ifcu; }; + #define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */ #define ifc_req ifc_ifcu.ifcu_req /* array of structures */ +#endif /* !(net/if.h && __USE_MISC) */ #endif /* _LINUX_IF_H */