blob: 74e3de1ce9154932e38f0dc1148b631a620be6a2 [file] [log] [blame]
Andrew Geissler635e0e42020-08-21 15:58:33 -05001From c25f8d1f7a6203dfeb10b39f80ffd314bb84a58d Mon Sep 17 00:00:00 2001
Brad Bishop6e60e8b2018-02-01 10:27:11 -05002From: Baruch Siach <baruch@tkos.co.il>
3Date: Thu, 22 Dec 2016 15:26:30 +0200
4Subject: [PATCH] libc-compat.h: add musl workaround
5
6The libc-compat.h kernel header uses glibc specific macros (__GLIBC__ and
7__USE_MISC) to solve conflicts with libc provided headers. This patch makes
8libc-compat.h work for musl libc as well.
9
10Upstream-Status: Pending
11
12Taken From:
13https://git.buildroot.net/buildroot/tree/package/iproute2/0001-Add-the-musl-workaround-to-the-libc-compat.h-copy.patch
14
15Signed-off-by: Baruch Siach <baruch@tkos.co.il>
16Signed-off-by: Maxin B. John <maxin.john@intel.com>
Andrew Geissler635e0e42020-08-21 15:58:33 -050017
Brad Bishop6e60e8b2018-02-01 10:27:11 -050018---
Brad Bishop316dfdd2018-06-25 12:45:53 -040019 include/uapi/linux/libc-compat.h | 4 +++-
Brad Bishop6e60e8b2018-02-01 10:27:11 -050020 1 file changed, 3 insertions(+), 1 deletion(-)
21
Brad Bishop316dfdd2018-06-25 12:45:53 -040022diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h
Andrew Geissler635e0e42020-08-21 15:58:33 -050023index a159991..22198fa 100644
Brad Bishop316dfdd2018-06-25 12:45:53 -040024--- a/include/uapi/linux/libc-compat.h
25+++ b/include/uapi/linux/libc-compat.h
Andrew Geissler635e0e42020-08-21 15:58:33 -050026@@ -50,10 +50,12 @@
Brad Bishop6e60e8b2018-02-01 10:27:11 -050027 #define _LIBC_COMPAT_H
28
29 /* We have included glibc headers... */
30-#if defined(__GLIBC__)
31+#if 1
32+#define __USE_MISC
33
34 /* Coordinate with glibc net/if.h header. */
35 #if defined(_NET_IF_H) && defined(__USE_MISC)
36+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0
37
38 /* GLIBC headers included first so don't define anything
39 * that would already be defined. */