Christopher Ferris | 2598113 | 2017-11-14 16:53:49 -0800 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
Christopher Ferris | e084501 | 2014-07-09 14:58:51 -0700 | [diff] [blame] | 2 | /* |
| 3 | * Compatibility interface for userspace libc header coordination: |
| 4 | * |
| 5 | * Define compatibility macros that are used to control the inclusion or |
| 6 | * exclusion of UAPI structures and definitions in coordination with another |
| 7 | * userspace C library. |
| 8 | * |
| 9 | * This header is intended to solve the problem of UAPI definitions that |
| 10 | * conflict with userspace definitions. If a UAPI header has such conflicting |
| 11 | * definitions then the solution is as follows: |
| 12 | * |
| 13 | * * Synchronize the UAPI header and the libc headers so either one can be |
| 14 | * used and such that the ABI is preserved. If this is not possible then |
| 15 | * no simple compatibility interface exists (you need to write translating |
| 16 | * wrappers and rename things) and you can't use this interface. |
| 17 | * |
| 18 | * Then follow this process: |
| 19 | * |
| 20 | * (a) Include libc-compat.h in the UAPI header. |
| 21 | * e.g. #include <linux/libc-compat.h> |
| 22 | * This include must be as early as possible. |
| 23 | * |
| 24 | * (b) In libc-compat.h add enough code to detect that the comflicting |
| 25 | * userspace libc header has been included first. |
| 26 | * |
| 27 | * (c) If the userspace libc header has been included first define a set of |
| 28 | * guard macros of the form __UAPI_DEF_FOO and set their values to 1, else |
| 29 | * set their values to 0. |
| 30 | * |
| 31 | * (d) Back in the UAPI header with the conflicting definitions, guard the |
| 32 | * definitions with: |
| 33 | * #if __UAPI_DEF_FOO |
| 34 | * ... |
| 35 | * #endif |
| 36 | * |
| 37 | * This fixes the situation where the linux headers are included *after* the |
| 38 | * libc headers. To fix the problem with the inclusion in the other order the |
| 39 | * userspace libc headers must be fixed like this: |
| 40 | * |
| 41 | * * For all definitions that conflict with kernel definitions wrap those |
| 42 | * defines in the following: |
| 43 | * #if !__UAPI_DEF_FOO |
| 44 | * ... |
| 45 | * #endif |
| 46 | * |
| 47 | * This prevents the redefinition of a construct already defined by the kernel. |
| 48 | */ |
| 49 | #ifndef _UAPI_LIBC_COMPAT_H |
| 50 | #define _UAPI_LIBC_COMPAT_H |
| 51 | |
| 52 | /* We have included glibc headers... */ |
| 53 | #if defined(__GLIBC__) |
| 54 | |
Christopher Ferris | 59ac31a | 2016-05-19 12:25:22 -0700 | [diff] [blame] | 55 | /* Coordinate with glibc net/if.h header. */ |
Christopher Ferris | ccfaccd | 2016-08-24 12:11:31 -0700 | [diff] [blame] | 56 | #if defined(_NET_IF_H) && defined(__USE_MISC) |
Christopher Ferris | 59ac31a | 2016-05-19 12:25:22 -0700 | [diff] [blame] | 57 | |
| 58 | /* GLIBC headers included first so don't define anything |
| 59 | * that would already be defined. */ |
| 60 | |
| 61 | #define __UAPI_DEF_IF_IFCONF 0 |
| 62 | #define __UAPI_DEF_IF_IFMAP 0 |
| 63 | #define __UAPI_DEF_IF_IFNAMSIZ 0 |
| 64 | #define __UAPI_DEF_IF_IFREQ 0 |
| 65 | /* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */ |
| 66 | #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 0 |
| 67 | /* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */ |
| 68 | #ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO |
| 69 | #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1 |
| 70 | #endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ |
| 71 | |
| 72 | #else /* _NET_IF_H */ |
| 73 | |
| 74 | /* Linux headers included first, and we must define everything |
| 75 | * we need. The expectation is that glibc will check the |
| 76 | * __UAPI_DEF_* defines and adjust appropriately. */ |
| 77 | |
| 78 | #define __UAPI_DEF_IF_IFCONF 1 |
| 79 | #define __UAPI_DEF_IF_IFMAP 1 |
| 80 | #define __UAPI_DEF_IF_IFNAMSIZ 1 |
| 81 | #define __UAPI_DEF_IF_IFREQ 1 |
| 82 | /* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */ |
| 83 | #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1 |
| 84 | /* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */ |
| 85 | #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1 |
| 86 | |
| 87 | #endif /* _NET_IF_H */ |
| 88 | |
Christopher Ferris | e084501 | 2014-07-09 14:58:51 -0700 | [diff] [blame] | 89 | /* Coordinate with glibc netinet/in.h header. */ |
| 90 | #if defined(_NETINET_IN_H) |
| 91 | |
| 92 | /* GLIBC headers included first so don't define anything |
| 93 | * that would already be defined. */ |
Christopher Ferris | 12e1f28 | 2016-02-04 12:35:07 -0800 | [diff] [blame] | 94 | #define __UAPI_DEF_IN_ADDR 0 |
| 95 | #define __UAPI_DEF_IN_IPPROTO 0 |
| 96 | #define __UAPI_DEF_IN_PKTINFO 0 |
| 97 | #define __UAPI_DEF_IP_MREQ 0 |
| 98 | #define __UAPI_DEF_SOCKADDR_IN 0 |
| 99 | #define __UAPI_DEF_IN_CLASS 0 |
| 100 | |
Christopher Ferris | e084501 | 2014-07-09 14:58:51 -0700 | [diff] [blame] | 101 | #define __UAPI_DEF_IN6_ADDR 0 |
| 102 | /* The exception is the in6_addr macros which must be defined |
| 103 | * if the glibc code didn't define them. This guard matches |
| 104 | * the guard in glibc/inet/netinet/in.h which defines the |
| 105 | * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */ |
| 106 | #if defined(__USE_MISC) || defined (__USE_GNU) |
| 107 | #define __UAPI_DEF_IN6_ADDR_ALT 0 |
| 108 | #else |
| 109 | #define __UAPI_DEF_IN6_ADDR_ALT 1 |
| 110 | #endif |
| 111 | #define __UAPI_DEF_SOCKADDR_IN6 0 |
| 112 | #define __UAPI_DEF_IPV6_MREQ 0 |
| 113 | #define __UAPI_DEF_IPPROTO_V6 0 |
Christopher Ferris | 67b3b9d | 2015-03-31 11:49:56 -0700 | [diff] [blame] | 114 | #define __UAPI_DEF_IPV6_OPTIONS 0 |
Christopher Ferris | 12e1f28 | 2016-02-04 12:35:07 -0800 | [diff] [blame] | 115 | #define __UAPI_DEF_IN6_PKTINFO 0 |
| 116 | #define __UAPI_DEF_IP6_MTUINFO 0 |
Christopher Ferris | e084501 | 2014-07-09 14:58:51 -0700 | [diff] [blame] | 117 | |
| 118 | #else |
| 119 | |
| 120 | /* Linux headers included first, and we must define everything |
| 121 | * we need. The expectation is that glibc will check the |
| 122 | * __UAPI_DEF_* defines and adjust appropriately. */ |
Christopher Ferris | 12e1f28 | 2016-02-04 12:35:07 -0800 | [diff] [blame] | 123 | #define __UAPI_DEF_IN_ADDR 1 |
| 124 | #define __UAPI_DEF_IN_IPPROTO 1 |
| 125 | #define __UAPI_DEF_IN_PKTINFO 1 |
| 126 | #define __UAPI_DEF_IP_MREQ 1 |
| 127 | #define __UAPI_DEF_SOCKADDR_IN 1 |
| 128 | #define __UAPI_DEF_IN_CLASS 1 |
| 129 | |
Christopher Ferris | e084501 | 2014-07-09 14:58:51 -0700 | [diff] [blame] | 130 | #define __UAPI_DEF_IN6_ADDR 1 |
| 131 | /* We unconditionally define the in6_addr macros and glibc must |
| 132 | * coordinate. */ |
| 133 | #define __UAPI_DEF_IN6_ADDR_ALT 1 |
| 134 | #define __UAPI_DEF_SOCKADDR_IN6 1 |
| 135 | #define __UAPI_DEF_IPV6_MREQ 1 |
| 136 | #define __UAPI_DEF_IPPROTO_V6 1 |
Christopher Ferris | 67b3b9d | 2015-03-31 11:49:56 -0700 | [diff] [blame] | 137 | #define __UAPI_DEF_IPV6_OPTIONS 1 |
Christopher Ferris | 12e1f28 | 2016-02-04 12:35:07 -0800 | [diff] [blame] | 138 | #define __UAPI_DEF_IN6_PKTINFO 1 |
| 139 | #define __UAPI_DEF_IP6_MTUINFO 1 |
Christopher Ferris | e084501 | 2014-07-09 14:58:51 -0700 | [diff] [blame] | 140 | |
| 141 | #endif /* _NETINET_IN_H */ |
| 142 | |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 143 | /* Coordinate with glibc netipx/ipx.h header. */ |
| 144 | #if defined(__NETIPX_IPX_H) |
| 145 | |
| 146 | #define __UAPI_DEF_SOCKADDR_IPX 0 |
| 147 | #define __UAPI_DEF_IPX_ROUTE_DEFINITION 0 |
| 148 | #define __UAPI_DEF_IPX_INTERFACE_DEFINITION 0 |
| 149 | #define __UAPI_DEF_IPX_CONFIG_DATA 0 |
| 150 | #define __UAPI_DEF_IPX_ROUTE_DEF 0 |
| 151 | |
| 152 | #else /* defined(__NETIPX_IPX_H) */ |
| 153 | |
| 154 | #define __UAPI_DEF_SOCKADDR_IPX 1 |
| 155 | #define __UAPI_DEF_IPX_ROUTE_DEFINITION 1 |
| 156 | #define __UAPI_DEF_IPX_INTERFACE_DEFINITION 1 |
| 157 | #define __UAPI_DEF_IPX_CONFIG_DATA 1 |
| 158 | #define __UAPI_DEF_IPX_ROUTE_DEF 1 |
| 159 | |
| 160 | #endif /* defined(__NETIPX_IPX_H) */ |
| 161 | |
Christopher Ferris | 3147524 | 2014-09-02 17:43:51 -0700 | [diff] [blame] | 162 | /* Definitions for xattr.h */ |
| 163 | #if defined(_SYS_XATTR_H) |
| 164 | #define __UAPI_DEF_XATTR 0 |
| 165 | #else |
| 166 | #define __UAPI_DEF_XATTR 1 |
| 167 | #endif |
Christopher Ferris | e084501 | 2014-07-09 14:58:51 -0700 | [diff] [blame] | 168 | |
| 169 | /* If we did not see any headers from any supported C libraries, |
| 170 | * or we are being included in the kernel, then define everything |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 171 | * that we need. Check for previous __UAPI_* definitions to give |
| 172 | * unsupported C libraries a way to opt out of any kernel definition. */ |
Christopher Ferris | e084501 | 2014-07-09 14:58:51 -0700 | [diff] [blame] | 173 | #else /* !defined(__GLIBC__) */ |
| 174 | |
Christopher Ferris | 59ac31a | 2016-05-19 12:25:22 -0700 | [diff] [blame] | 175 | /* Definitions for if.h */ |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 176 | #ifndef __UAPI_DEF_IF_IFCONF |
Christopher Ferris | 59ac31a | 2016-05-19 12:25:22 -0700 | [diff] [blame] | 177 | #define __UAPI_DEF_IF_IFCONF 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 178 | #endif |
| 179 | #ifndef __UAPI_DEF_IF_IFMAP |
Christopher Ferris | 59ac31a | 2016-05-19 12:25:22 -0700 | [diff] [blame] | 180 | #define __UAPI_DEF_IF_IFMAP 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 181 | #endif |
| 182 | #ifndef __UAPI_DEF_IF_IFNAMSIZ |
Christopher Ferris | 59ac31a | 2016-05-19 12:25:22 -0700 | [diff] [blame] | 183 | #define __UAPI_DEF_IF_IFNAMSIZ 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 184 | #endif |
| 185 | #ifndef __UAPI_DEF_IF_IFREQ |
Christopher Ferris | 59ac31a | 2016-05-19 12:25:22 -0700 | [diff] [blame] | 186 | #define __UAPI_DEF_IF_IFREQ 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 187 | #endif |
Christopher Ferris | 59ac31a | 2016-05-19 12:25:22 -0700 | [diff] [blame] | 188 | /* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */ |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 189 | #ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS |
Christopher Ferris | 59ac31a | 2016-05-19 12:25:22 -0700 | [diff] [blame] | 190 | #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 191 | #endif |
Christopher Ferris | 59ac31a | 2016-05-19 12:25:22 -0700 | [diff] [blame] | 192 | /* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */ |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 193 | #ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO |
Christopher Ferris | 59ac31a | 2016-05-19 12:25:22 -0700 | [diff] [blame] | 194 | #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 195 | #endif |
Christopher Ferris | 59ac31a | 2016-05-19 12:25:22 -0700 | [diff] [blame] | 196 | |
Christopher Ferris | 12e1f28 | 2016-02-04 12:35:07 -0800 | [diff] [blame] | 197 | /* Definitions for in.h */ |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 198 | #ifndef __UAPI_DEF_IN_ADDR |
Christopher Ferris | 12e1f28 | 2016-02-04 12:35:07 -0800 | [diff] [blame] | 199 | #define __UAPI_DEF_IN_ADDR 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 200 | #endif |
| 201 | #ifndef __UAPI_DEF_IN_IPPROTO |
Christopher Ferris | 12e1f28 | 2016-02-04 12:35:07 -0800 | [diff] [blame] | 202 | #define __UAPI_DEF_IN_IPPROTO 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 203 | #endif |
| 204 | #ifndef __UAPI_DEF_IN_PKTINFO |
Christopher Ferris | 12e1f28 | 2016-02-04 12:35:07 -0800 | [diff] [blame] | 205 | #define __UAPI_DEF_IN_PKTINFO 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 206 | #endif |
| 207 | #ifndef __UAPI_DEF_IP_MREQ |
Christopher Ferris | 12e1f28 | 2016-02-04 12:35:07 -0800 | [diff] [blame] | 208 | #define __UAPI_DEF_IP_MREQ 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 209 | #endif |
| 210 | #ifndef __UAPI_DEF_SOCKADDR_IN |
Christopher Ferris | 12e1f28 | 2016-02-04 12:35:07 -0800 | [diff] [blame] | 211 | #define __UAPI_DEF_SOCKADDR_IN 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 212 | #endif |
| 213 | #ifndef __UAPI_DEF_IN_CLASS |
Christopher Ferris | 12e1f28 | 2016-02-04 12:35:07 -0800 | [diff] [blame] | 214 | #define __UAPI_DEF_IN_CLASS 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 215 | #endif |
Christopher Ferris | 12e1f28 | 2016-02-04 12:35:07 -0800 | [diff] [blame] | 216 | |
Christopher Ferris | e084501 | 2014-07-09 14:58:51 -0700 | [diff] [blame] | 217 | /* Definitions for in6.h */ |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 218 | #ifndef __UAPI_DEF_IN6_ADDR |
Christopher Ferris | e084501 | 2014-07-09 14:58:51 -0700 | [diff] [blame] | 219 | #define __UAPI_DEF_IN6_ADDR 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 220 | #endif |
| 221 | #ifndef __UAPI_DEF_IN6_ADDR_ALT |
Christopher Ferris | e084501 | 2014-07-09 14:58:51 -0700 | [diff] [blame] | 222 | #define __UAPI_DEF_IN6_ADDR_ALT 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 223 | #endif |
| 224 | #ifndef __UAPI_DEF_SOCKADDR_IN6 |
Christopher Ferris | e084501 | 2014-07-09 14:58:51 -0700 | [diff] [blame] | 225 | #define __UAPI_DEF_SOCKADDR_IN6 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 226 | #endif |
| 227 | #ifndef __UAPI_DEF_IPV6_MREQ |
Christopher Ferris | e084501 | 2014-07-09 14:58:51 -0700 | [diff] [blame] | 228 | #define __UAPI_DEF_IPV6_MREQ 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 229 | #endif |
| 230 | #ifndef __UAPI_DEF_IPPROTO_V6 |
Christopher Ferris | e084501 | 2014-07-09 14:58:51 -0700 | [diff] [blame] | 231 | #define __UAPI_DEF_IPPROTO_V6 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 232 | #endif |
| 233 | #ifndef __UAPI_DEF_IPV6_OPTIONS |
Christopher Ferris | 67b3b9d | 2015-03-31 11:49:56 -0700 | [diff] [blame] | 234 | #define __UAPI_DEF_IPV6_OPTIONS 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 235 | #endif |
| 236 | #ifndef __UAPI_DEF_IN6_PKTINFO |
Christopher Ferris | 12e1f28 | 2016-02-04 12:35:07 -0800 | [diff] [blame] | 237 | #define __UAPI_DEF_IN6_PKTINFO 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 238 | #endif |
| 239 | #ifndef __UAPI_DEF_IP6_MTUINFO |
Christopher Ferris | 12e1f28 | 2016-02-04 12:35:07 -0800 | [diff] [blame] | 240 | #define __UAPI_DEF_IP6_MTUINFO 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 241 | #endif |
Christopher Ferris | e084501 | 2014-07-09 14:58:51 -0700 | [diff] [blame] | 242 | |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 243 | /* Definitions for ipx.h */ |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 244 | #ifndef __UAPI_DEF_SOCKADDR_IPX |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 245 | #define __UAPI_DEF_SOCKADDR_IPX 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 246 | #endif |
| 247 | #ifndef __UAPI_DEF_IPX_ROUTE_DEFINITION |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 248 | #define __UAPI_DEF_IPX_ROUTE_DEFINITION 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 249 | #endif |
| 250 | #ifndef __UAPI_DEF_IPX_INTERFACE_DEFINITION |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 251 | #define __UAPI_DEF_IPX_INTERFACE_DEFINITION 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 252 | #endif |
| 253 | #ifndef __UAPI_DEF_IPX_CONFIG_DATA |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 254 | #define __UAPI_DEF_IPX_CONFIG_DATA 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 255 | #endif |
| 256 | #ifndef __UAPI_DEF_IPX_ROUTE_DEF |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 257 | #define __UAPI_DEF_IPX_ROUTE_DEF 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 258 | #endif |
Christopher Ferris | 6e3550f | 2016-12-12 14:51:18 -0800 | [diff] [blame] | 259 | |
Christopher Ferris | 3147524 | 2014-09-02 17:43:51 -0700 | [diff] [blame] | 260 | /* Definitions for xattr.h */ |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 261 | #ifndef __UAPI_DEF_XATTR |
Christopher Ferris | 3147524 | 2014-09-02 17:43:51 -0700 | [diff] [blame] | 262 | #define __UAPI_DEF_XATTR 1 |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 263 | #endif |
Christopher Ferris | 3147524 | 2014-09-02 17:43:51 -0700 | [diff] [blame] | 264 | |
Christopher Ferris | e084501 | 2014-07-09 14:58:51 -0700 | [diff] [blame] | 265 | #endif /* __GLIBC__ */ |
| 266 | |
Christopher Ferris | a1a109e | 2018-01-31 15:03:12 -0800 | [diff] [blame] | 267 | /* Definitions for if_ether.h */ |
| 268 | /* allow libcs like musl to deactivate this, glibc does not implement this. */ |
| 269 | #ifndef __UAPI_DEF_ETHHDR |
| 270 | #define __UAPI_DEF_ETHHDR 1 |
| 271 | #endif |
| 272 | |
Christopher Ferris | e084501 | 2014-07-09 14:58:51 -0700 | [diff] [blame] | 273 | #endif /* _UAPI_LIBC_COMPAT_H */ |