提交 b583c5d3 编写于 作者: H Hauke Mehrtens 提交者: Rich Felker

add additional uapi guards for Linux kernel header files

With Linux kernel 4.16 it will be possible to guard more parts of the
Linux header files from a libc. Make use of this in musl to guard all
the structures and other definitions from the Linux header files which
are also defined by the header files provided by musl. This will make
it possible to compile source files which include both the libc
headers and the kernel userspace headers.

This extends the definitions done in commit 04983f22 ("make
netinet/in.h suppress clashing definitions from kernel headers")
上级 628cf979
......@@ -125,6 +125,13 @@ struct ifconf {
#define ifc_req ifc_ifcu.ifcu_req
#define _IOT_ifconf _IOT(_IOTS(struct ifconf),1,0,0,0,0)
#define __UAPI_DEF_IF_IFCONF 0
#define __UAPI_DEF_IF_IFMAP 0
#define __UAPI_DEF_IF_IFNAMSIZ 0
#define __UAPI_DEF_IF_IFREQ 0
#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 0
#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0
#endif
#ifdef __cplusplus
......
......@@ -133,5 +133,6 @@ do { \
(enaddr)[5] = ((uint8_t *)ipaddr)[3]; \
} while(0)
#define __UAPI_DEF_ETHHDR 0
#endif
......@@ -24,6 +24,8 @@ int removexattr(const char *, const char *);
int lremovexattr(const char *, const char *);
int fremovexattr(int, const char *);
#define __UAPI_DEF_XATTR 0
#ifdef __cplusplus
}
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册