--- zzzz-none-000/linux-4.4.271/include/uapi/linux/libc-compat.h 2021-06-03 06:22:09.000000000 +0000 +++ hawkeye-5590-750/linux-4.4.271/include/uapi/linux/libc-compat.h 2023-04-19 10:22:30.000000000 +0000 @@ -48,8 +48,8 @@ #ifndef _UAPI_LIBC_COMPAT_H #define _UAPI_LIBC_COMPAT_H -/* We have included glibc headers... */ -#if defined(__GLIBC__) +/* We have included libc headers... */ +#if !defined(__KERNEL__) /* Coordinate with glibc net/if.h header. */ #if defined(_NET_IF_H) && defined(__USE_MISC) @@ -85,10 +85,10 @@ #endif /* _NET_IF_H */ -/* Coordinate with glibc netinet/in.h header. */ +/* Coordinate with libc netinet/in.h header. */ #if defined(_NETINET_IN_H) -/* GLIBC headers included first so don't define anything +/* LIBC headers included first so don't define anything * that would already be defined. */ #define __UAPI_DEF_IN_ADDR 0 #define __UAPI_DEF_IN_IPPROTO 0 @@ -102,7 +102,7 @@ * if the glibc code didn't define them. This guard matches * the guard in glibc/inet/netinet/in.h which defines the * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */ -#if defined(__USE_MISC) || defined (__USE_GNU) +#if !defined(__GLIBC__) || defined(__USE_MISC) || defined (__USE_GNU) #define __UAPI_DEF_IN6_ADDR_ALT 0 #else #define __UAPI_DEF_IN6_ADDR_ALT 1 @@ -117,7 +117,7 @@ #else /* Linux headers included first, and we must define everything - * we need. The expectation is that glibc will check the + * we need. The expectation is that the libc will check the * __UAPI_DEF_* defines and adjust appropriately. */ #define __UAPI_DEF_IN_ADDR 1 #define __UAPI_DEF_IN_IPPROTO 1 @@ -127,7 +127,7 @@ #define __UAPI_DEF_IN_CLASS 1 #define __UAPI_DEF_IN6_ADDR 1 -/* We unconditionally define the in6_addr macros and glibc must +/* We unconditionally define the in6_addr macros and the libc must * coordinate. */ #define __UAPI_DEF_IN6_ADDR_ALT 1 #define __UAPI_DEF_SOCKADDR_IN6 1 @@ -149,7 +149,7 @@ /* If we did not see any headers from any supported C libraries, * or we are being included in the kernel, then define everything * that we need. */ -#else /* !defined(__GLIBC__) */ +#else /* defined(__KERNEL__) */ /* Definitions for if.h */ #define __UAPI_DEF_IF_IFCONF 1 @@ -182,6 +182,6 @@ /* Definitions for xattr.h */ #define __UAPI_DEF_XATTR 1 -#endif /* __GLIBC__ */ +#endif /* __KERNEL__ */ #endif /* _UAPI_LIBC_COMPAT_H */