Skip to contentSkip to conversation

gfs2-utils: Include asm/types.h in our linux/types.h

PATCH New Andrew Price 1 participant 1 message Jun 29, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gfs2-utils: Include asm/types.h in our linux/types.h

Include asm/types.h to provide __u* and __s*, and __vector128 which fixes build failures on ppc64le and s390x:

In file included from /usr/include/asm/sigcontext.h:14,

                   from /usr/include/bits/sigcontext.h:30,
                   from /usr/include/signal.h:291,
                   from hexedit.c:16:

/usr/include/asm/elf.h:160:9: error: unknown type name ?__vector128?
typedef __vector128 elf_vrreg_t;

asm/types.h is included in the original linux/types.h so this reduces the difference (at the expense of portability).

---
 gfs2/include/linux/types.h | 24 ++++++++----------------
 1 file changed, 8 insertions(+), 16 deletions(-)
gfs2/include/linux/types.h +8 -16
index a092afc0..46ef54ba 100644
@@ -1,6 +1,8 @@
 #ifndef LINUX_TYPES_H
 #define LINUX_TYPES_H
 
+#include <asm/types.h>
+
 /* Satisfy gfs2_ondisk.h with userspace definitions of kernel types */
 
 #include <stdint.h>
@@ -15,21 +17,11 @@
 #define __bitwise __bitwise__
 #define __force __force__
 
-typedef uint8_t __u8;
-typedef uint16_t __u16;
-typedef uint32_t __u32;
-typedef uint64_t __u64;
-
-typedef int8_t __s8;
-typedef int16_t __s16;
-typedef int32_t __s32;
-typedef int64_t __s64;
-
-typedef __u16 __bitwise __le16;
-typedef __u16 __bitwise __be16;
-typedef __u32 __bitwise __le32;
-typedef __u32 __bitwise __be32;
-typedef __u64 __bitwise __le64;
-typedef __u64 __bitwise __be64;
+typedef uint16_t __bitwise __le16;
+typedef uint16_t __bitwise __be16;
+typedef uint32_t __bitwise __le32;
+typedef uint32_t __bitwise __be32;
+typedef uint64_t __bitwise __le64;
+typedef uint64_t __bitwise __be64;
 
 #endif /* LINUX_TYPES_H */
Signature · 1 line
2.31.1