提交 6cbd06bf 编写于 作者: A Andrew Pinski 提交者: Yang Yingliang

arm64: uapi: set __BITS_PER_LONG correctly for ILP32 and LP64

hulk inclusion
category: feature
bugzilla: NA
CVE: NA
---------------------------

Define __BITS_PER_LONG depending on the ABI used (i.e. check whether
__ILP32__ or __LP64__ is defined).  This is necessary for glibc to
determine the appropriate type definitions for the system call interface.
Signed-off-by: NAndrew Pinski <apinski@cavium.com>
Signed-off-by: NPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: NChristoph Muellner <christoph.muellner@theobroma-systems.com>
Signed-off-by: NYury Norov <ynorov@caviumnetworks.com>
Reviewed-by: NDavid Daney <ddaney@caviumnetworks.com>
Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: NHanjun Guo &lt;guohanjun@huawei.com <mailto:guohanjun@huawei.com&gt;>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 69bbb51d
...@@ -17,7 +17,14 @@ ...@@ -17,7 +17,14 @@
#ifndef __ASM_BITSPERLONG_H #ifndef __ASM_BITSPERLONG_H
#define __ASM_BITSPERLONG_H #define __ASM_BITSPERLONG_H
#define __BITS_PER_LONG 64 #if defined(__LP64__)
/* Assuming __LP64__ will be defined for native ELF64's and not for ILP32. */
# define __BITS_PER_LONG 64
#elif defined(__ILP32__)
# define __BITS_PER_LONG 32
#else
# error "Neither LP64 nor ILP32: unsupported ABI in asm/bitsperlong.h"
#endif
#include <asm-generic/bitsperlong.h> #include <asm-generic/bitsperlong.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册