diff mbox

[resend,3/4] uapi glibc compat: Do not check for __USE_MISC

Message ID 20170412203103.6057-4-hauke@hauke-m.de
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Hauke Mehrtens April 12, 2017, 8:31 p.m. UTC
__USE_MISC is glibc specific and not available in musl libc. Only do
this check when glibc is used. This fixes a problem with musl libc.

Acked-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 include/uapi/linux/libc-compat.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

David Miller April 17, 2017, 4:55 p.m. UTC | #1
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Wed, 12 Apr 2017 22:31:02 +0200

> __USE_MISC is glibc specific and not available in musl libc. Only do
> this check when glibc is used. This fixes a problem with musl libc.
> 
> Acked-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

You yourself introduce this problem in patch #1.

The code before patch #1 was perfectly fine, as this code block only
existing in an area protected by __GLIBC__.

So you have to redo these patches such that you deal with all of
the fallout from changing __GLIBC__ into !__KERNEL__ at the same
time that you make that change.

Thanks.
diff mbox

Patch

diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h
index 49a8cc3138ae..ce2fa8a4ced6 100644
--- a/include/uapi/linux/libc-compat.h
+++ b/include/uapi/linux/libc-compat.h
@@ -51,8 +51,8 @@ 
 /* We have included libc headers... */
 #if !defined(__KERNEL__)
 
-/* Coordinate with glibc net/if.h header. */
-#if defined(_NET_IF_H) && defined(__USE_MISC)
+/* Coordinate with libc net/if.h header. */
+#if defined(_NET_IF_H) && (!defined(__GLIBC__) || defined(__USE_MISC))
 
 /* GLIBC headers included first so don't define anything
  * that would already be defined. */