missing: use integer types used by kernel

By using them, we can decrease included headers except linux/types.h.
This commit is contained in:
Yu Watanabe 2018-12-06 06:24:20 +01:00
parent 666a84eaca
commit 9cb6c6ecb0
2 changed files with 24 additions and 23 deletions

View file

@ -2,6 +2,7 @@
#pragma once #pragma once
#include <linux/input.h> #include <linux/input.h>
#include <linux/types.h>
/* linux@c7dc65737c9a607d3e6f8478659876074ad129b8 (3.12) */ /* linux@c7dc65737c9a607d3e6f8478659876074ad129b8 (3.12) */
#ifndef EVIOCREVOKE #ifndef EVIOCREVOKE
@ -11,9 +12,9 @@
/* linux@06a16293f71927f756dcf37558a79c0b05a91641 (4.4) */ /* linux@06a16293f71927f756dcf37558a79c0b05a91641 (4.4) */
#ifndef EVIOCSMASK #ifndef EVIOCSMASK
struct input_mask { struct input_mask {
uint32_t type; __u32 type;
uint32_t codes_size; __u32 codes_size;
uint64_t codes_ptr; __u64 codes_ptr;
}; };
#define EVIOCGMASK _IOR('E', 0x92, struct input_mask) #define EVIOCGMASK _IOR('E', 0x92, struct input_mask)

View file

@ -11,32 +11,32 @@
/* a528d35e8bfcc521d7cb70aaf03e1bd296c8493f (4.11) */ /* a528d35e8bfcc521d7cb70aaf03e1bd296c8493f (4.11) */
#if !HAVE_STRUCT_STATX #if !HAVE_STRUCT_STATX
struct statx_timestamp { struct statx_timestamp {
int64_t tv_sec; __s64 tv_sec;
uint32_t tv_nsec; __u32 tv_nsec;
uint32_t __reserved; __s32 __reserved;
}; };
struct statx { struct statx {
uint32_t stx_mask; __u32 stx_mask;
uint32_t stx_blksize; __u32 stx_blksize;
uint64_t stx_attributes; __u64 stx_attributes;
uint32_t stx_nlink; __u32 stx_nlink;
uint32_t stx_uid; __u32 stx_uid;
uint32_t stx_gid; __u32 stx_gid;
uint16_t stx_mode; __u16 stx_mode;
uint16_t __spare0[1]; __u16 __spare0[1];
uint64_t stx_ino; __u64 stx_ino;
uint64_t stx_size; __u64 stx_size;
uint64_t stx_blocks; __u64 stx_blocks;
uint64_t stx_attributes_mask; __u64 stx_attributes_mask;
struct statx_timestamp stx_atime; struct statx_timestamp stx_atime;
struct statx_timestamp stx_btime; struct statx_timestamp stx_btime;
struct statx_timestamp stx_ctime; struct statx_timestamp stx_ctime;
struct statx_timestamp stx_mtime; struct statx_timestamp stx_mtime;
uint32_t stx_rdev_major; __u32 stx_rdev_major;
uint32_t stx_rdev_minor; __u32 stx_rdev_minor;
uint32_t stx_dev_major; __u32 stx_dev_major;
uint32_t stx_dev_minor; __u32 stx_dev_minor;
uint64_t __spare2[14]; __u64 __spare2[14];
}; };
#endif #endif