]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
missing: use integer types used by kernel
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 6 Dec 2018 05:24:20 +0000 (06:24 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 6 Dec 2018 12:24:00 +0000 (13:24 +0100)
By using them, we can decrease included headers except linux/types.h.

src/basic/missing_input.h
src/basic/missing_stat.h

index 93cdf9a310beec1b6d0ec3908f671f650733f191..b91ccb6485a88fe28493b13b447bf14d4836eba1 100644 (file)
@@ -2,6 +2,7 @@
 #pragma once
 
 #include <linux/input.h>
+#include <linux/types.h>
 
 /* linux@c7dc65737c9a607d3e6f8478659876074ad129b8 (3.12) */
 #ifndef EVIOCREVOKE
@@ -11,9 +12,9 @@
 /* linux@06a16293f71927f756dcf37558a79c0b05a91641 (4.4) */
 #ifndef EVIOCSMASK
 struct input_mask {
-        uint32_t type;
-        uint32_t codes_size;
-        uint64_t codes_ptr;
+        __u32 type;
+        __u32 codes_size;
+        __u64 codes_ptr;
 };
 
 #define EVIOCGMASK _IOR('E', 0x92, struct input_mask)
index 85f98e2690c795aae790e861072d2cca9130ca1d..5116206a2e53cdb265b7facbd21584ff908b7489 100644 (file)
 /* a528d35e8bfcc521d7cb70aaf03e1bd296c8493f (4.11) */
 #if !HAVE_STRUCT_STATX
 struct statx_timestamp {
-        int64_t tv_sec;
-        uint32_t tv_nsec;
-        uint32_t __reserved;
+        __s64 tv_sec;
+        __u32 tv_nsec;
+        __s32 __reserved;
 };
 struct statx {
-        uint32_t stx_mask;
-        uint32_t stx_blksize;
-        uint64_t stx_attributes;
-        uint32_t stx_nlink;
-        uint32_t stx_uid;
-        uint32_t stx_gid;
-        uint16_t stx_mode;
-        uint16_t __spare0[1];
-        uint64_t stx_ino;
-        uint64_t stx_size;
-        uint64_t stx_blocks;
-        uint64_t stx_attributes_mask;
+        __u32 stx_mask;
+        __u32 stx_blksize;
+        __u64 stx_attributes;
+        __u32 stx_nlink;
+        __u32 stx_uid;
+        __u32 stx_gid;
+        __u16 stx_mode;
+        __u16 __spare0[1];
+        __u64 stx_ino;
+        __u64 stx_size;
+        __u64 stx_blocks;
+        __u64 stx_attributes_mask;
         struct statx_timestamp stx_atime;
         struct statx_timestamp stx_btime;
         struct statx_timestamp stx_ctime;
         struct statx_timestamp stx_mtime;
-        uint32_t stx_rdev_major;
-        uint32_t stx_rdev_minor;
-        uint32_t stx_dev_major;
-        uint32_t stx_dev_minor;
-        uint64_t __spare2[14];
+        __u32 stx_rdev_major;
+        __u32 stx_rdev_minor;
+        __u32 stx_dev_major;
+        __u32 stx_dev_minor;
+        __u64 __spare2[14];
 };
 #endif