uapi: Define __BITS_PER_LONG based on compiler target
authorEthan Chen <intervigil@gmail.com>
Tue, 4 Sep 2018 02:11:39 +0000 (19:11 -0700)
committerStricted <info@stricted.net>
Tue, 6 Aug 2019 11:33:34 +0000 (11:33 +0000)
* We may compile 32-bit ARM code against these kernel headers in many
  situations, so provide a compiler-defined method of obtaining the width
  of long.

Change-Id: Iac5e48200d70f1258ab3caca1a8f1eb6e8f7f2d3

arch/arm64/include/uapi/asm/bitsperlong.h

index fce9c2924fa3464877ae78a4e33b90728ce02d41..71f93d50bb2d94b6d301c88bf790a9de7168628a 100644 (file)
 #ifndef __ASM_BITSPERLONG_H
 #define __ASM_BITSPERLONG_H
 
+#ifdef __aarch64__
 #define __BITS_PER_LONG 64
+#else
+#define __BITS_PER_LONG 32
+#endif
 
 #include <asm-generic/bitsperlong.h>