提交 f990dafc 编写于 作者: O openharmony_ci 提交者: Gitee

!21 bugfix for linux 4.19 uapi

Merge pull request !21 from Zachery Wu/zzzuo
......@@ -48,7 +48,6 @@ key_list = [
["SIGRTMIN", ".", "SIGRTMIN", "__SIGRTMIN"],
["SIGRTMAX", ".", "SIGRTMAX", "__SIGRTMAX"],
["struct udphdr", ".", "struct udphdr", "struct __kernel_udphdr"],
["__attribute_const__", ".", "__attribute_const__", "__attribute__((__const__))"],
["struct __kernel_sockaddr_storage", ".", "struct __kernel_sockaddr_storage", "struct sockaddr_storage"],
["off_t", "asm-mips/asm/stat.h", "off_t", "__kernel_off_t"],
["#ifndef __EXPORTED_HEADERS__", ".", "#ifndef __EXPORTED_HEADERS__", "#if 0 \/*__EXPORTED_HEADERS__*\/"],
......
......@@ -11,7 +11,7 @@
# define __SWAB_64_THRU_32__
#endif
#if !defined(__KERNEL__) || __LINUX_ARM_ARCH__ < 6
static inline __attribute__((__const__)) __u32 __arch_swab32(__u32 x)
static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
{
__u32 t;
#ifndef __thumb__
......
......@@ -118,8 +118,8 @@ struct ftrace_likely_data {
#define __native_word(t) \
(sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
#ifndef __attribute__((__const__))
#define __attribute__((__const__)) __attribute__((__const__))
#ifndef __attribute_const__
#define __attribute_const__ __attribute__((__const__))
#endif
#ifndef __noclone
#define __noclone
......
......@@ -32,7 +32,7 @@
#define ___constant_swahb32(x) ((__u32)( \
(((__u32)(x) & (__u32)0x00ff00ffUL) << 8) | \
(((__u32)(x) & (__u32)0xff00ff00UL) >> 8)))
static inline __attribute__((__const__)) __u16 __fswab16(__u16 val)
static inline __attribute_const__ __u16 __fswab16(__u16 val)
{
#if defined (__arch_swab16)
return __arch_swab16(val);
......@@ -40,7 +40,7 @@ static inline __attribute__((__const__)) __u16 __fswab16(__u16 val)
return ___constant_swab16(val);
#endif
}
static inline __attribute__((__const__)) __u32 __fswab32(__u32 val)
static inline __attribute_const__ __u32 __fswab32(__u32 val)
{
#if defined(__arch_swab32)
return __arch_swab32(val);
......@@ -48,7 +48,7 @@ static inline __attribute__((__const__)) __u32 __fswab32(__u32 val)
return ___constant_swab32(val);
#endif
}
static inline __attribute__((__const__)) __u64 __fswab64(__u64 val)
static inline __attribute_const__ __u64 __fswab64(__u64 val)
{
#if defined (__arch_swab64)
return __arch_swab64(val);
......@@ -60,7 +60,7 @@ static inline __attribute__((__const__)) __u64 __fswab64(__u64 val)
return ___constant_swab64(val);
#endif
}
static inline __attribute__((__const__)) __u32 __fswahw32(__u32 val)
static inline __attribute_const__ __u32 __fswahw32(__u32 val)
{
#ifdef __arch_swahw32
return __arch_swahw32(val);
......@@ -68,7 +68,7 @@ static inline __attribute__((__const__)) __u32 __fswahw32(__u32 val)
return ___constant_swahw32(val);
#endif
}
static inline __attribute__((__const__)) __u32 __fswahb32(__u32 val)
static inline __attribute_const__ __u32 __fswahb32(__u32 val)
{
#ifdef __arch_swahb32
return __arch_swahb32(val);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册