Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | From b7d96340c55afb7023ded0041107c63dbd886196 Mon Sep 17 00:00:00 2001 |
| 2 | From: Baruch Siach <baruch@tkos.co.il> |
| 3 | Date: Thu, 22 Dec 2016 15:26:30 +0200 |
| 4 | Subject: [PATCH] libc-compat.h: add musl workaround |
| 5 | |
| 6 | The libc-compat.h kernel header uses glibc specific macros (__GLIBC__ and |
| 7 | __USE_MISC) to solve conflicts with libc provided headers. This patch makes |
| 8 | libc-compat.h work for musl libc as well. |
| 9 | |
| 10 | Upstream-Status: Pending |
| 11 | |
| 12 | Taken From: |
| 13 | https://git.buildroot.net/buildroot/tree/package/iproute2/0001-Add-the-musl-workaround-to-the-libc-compat.h-copy.patch |
| 14 | |
| 15 | Signed-off-by: Baruch Siach <baruch@tkos.co.il> |
| 16 | Signed-off-by: Maxin B. John <maxin.john@intel.com> |
| 17 | --- |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 18 | include/uapi/linux/libc-compat.h | 4 +++- |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 19 | 1 file changed, 3 insertions(+), 1 deletion(-) |
| 20 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 21 | diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 22 | index f38571d..30f0b67 100644 |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 23 | --- a/include/uapi/linux/libc-compat.h |
| 24 | +++ b/include/uapi/linux/libc-compat.h |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 25 | @@ -49,10 +49,12 @@ |
| 26 | #define _LIBC_COMPAT_H |
| 27 | |
| 28 | /* We have included glibc headers... */ |
| 29 | -#if defined(__GLIBC__) |
| 30 | +#if 1 |
| 31 | +#define __USE_MISC |
| 32 | |
| 33 | /* Coordinate with glibc net/if.h header. */ |
| 34 | #if defined(_NET_IF_H) && defined(__USE_MISC) |
| 35 | +#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0 |
| 36 | |
| 37 | /* GLIBC headers included first so don't define anything |
| 38 | * that would already be defined. */ |
| 39 | -- |
| 40 | 2.4.0 |
| 41 | |