@@ -3,6 +3,36 @@ pub type __priority_which_t = ::c_uint;
3
3
pub type __rlimit_resource_t = :: c_uint ;
4
4
5
5
s ! {
6
+ pub struct statx {
7
+ pub stx_mask: :: uint32_t,
8
+ pub stx_blksize: :: uint32_t,
9
+ pub stx_attributes: :: uint64_t,
10
+ pub stx_nlink: :: uint32_t,
11
+ pub stx_uid: :: uint32_t,
12
+ pub stx_gid: :: uint32_t,
13
+ pub stx_mode: :: uint16_t,
14
+ pub __statx_pad1: [ :: uint16_t; 1 ] ,
15
+ pub stx_ino: :: uint64_t,
16
+ pub stx_size: :: uint64_t,
17
+ pub stx_blocks: :: uint64_t,
18
+ pub stx_attributes_mask: :: uint64_t,
19
+ pub stx_atime: :: statx_timestamp,
20
+ pub stx_btime: :: statx_timestamp,
21
+ pub stx_ctime: :: statx_timestamp,
22
+ pub stx_mtime: :: statx_timestamp,
23
+ pub stx_rdev_major: :: uint32_t,
24
+ pub stx_rdev_minor: :: uint32_t,
25
+ pub stx_dev_major: :: uint32_t,
26
+ pub stx_dev_minor: :: uint32_t,
27
+ pub __statx_pad2: [ :: uint64_t; 14 ] ,
28
+ }
29
+
30
+ pub struct statx_timestamp {
31
+ pub tv_sec: :: int64_t,
32
+ pub tv_nsec: :: uint32_t,
33
+ pub __statx_timestamp_pad1: [ :: int32_t; 1 ] ,
34
+ }
35
+
6
36
pub struct aiocb {
7
37
pub aio_fildes: :: c_int,
8
38
pub aio_lio_opcode: :: c_int,
@@ -931,6 +961,32 @@ pub const AF_MAX: ::c_int = 45;
931
961
#[ doc( hidden) ]
932
962
pub const PF_MAX : :: c_int = AF_MAX ;
933
963
964
+ pub const AT_STATX_SYNC_TYPE : :: c_int = 0x6000 ;
965
+ pub const AT_STATX_SYNC_AS_STAT : :: c_int = 0x0000 ;
966
+ pub const AT_STATX_FORCE_SYNC : :: c_int = 0x2000 ;
967
+ pub const AT_STATX_DONT_SYNC : :: c_int = 0x4000 ;
968
+ pub const STATX_TYPE : :: c_uint = 0x0001 ;
969
+ pub const STATX_MODE : :: c_uint = 0x0002 ;
970
+ pub const STATX_NLINK : :: c_uint = 0x0004 ;
971
+ pub const STATX_UID : :: c_uint = 0x0008 ;
972
+ pub const STATX_GID : :: c_uint = 0x0010 ;
973
+ pub const STATX_ATIME : :: c_uint = 0x0020 ;
974
+ pub const STATX_MTIME : :: c_uint = 0x0040 ;
975
+ pub const STATX_CTIME : :: c_uint = 0x0080 ;
976
+ pub const STATX_INO : :: c_uint = 0x0100 ;
977
+ pub const STATX_SIZE : :: c_uint = 0x0200 ;
978
+ pub const STATX_BLOCKS : :: c_uint = 0x0400 ;
979
+ pub const STATX_BASIC_STATS : :: c_uint = 0x07ff ;
980
+ pub const STATX_BTIME : :: c_uint = 0x0800 ;
981
+ pub const STATX_ALL : :: c_uint = 0x0fff ;
982
+ pub const STATX__RESERVED : :: c_int = 0x80000000 ;
983
+ pub const STATX_ATTR_COMPRESSED : :: c_int = 0x0004 ;
984
+ pub const STATX_ATTR_IMMUTABLE : :: c_int = 0x0010 ;
985
+ pub const STATX_ATTR_APPEND : :: c_int = 0x0020 ;
986
+ pub const STATX_ATTR_NODUMP : :: c_int = 0x0040 ;
987
+ pub const STATX_ATTR_ENCRYPTED : :: c_int = 0x0800 ;
988
+ pub const STATX_ATTR_AUTOMOUNT : :: c_int = 0x1000 ;
989
+
934
990
cfg_if ! {
935
991
if #[ cfg( any( target_arch = "arm" , target_arch = "x86" ,
936
992
target_arch = "x86_64" ) ) ] {
@@ -981,6 +1037,8 @@ extern {
981
1037
pub fn mallopt ( param : :: c_int , value : :: c_int ) -> :: c_int ;
982
1038
pub fn gettimeofday ( tp : * mut :: timeval ,
983
1039
tz : * mut :: timezone ) -> :: c_int ;
1040
+ pub fn statx ( dirfd : :: c_int , pathname : * const c_char , flags : :: c_int ,
1041
+ mask : :: c_uint , statxbuf : * mut statx ) -> :: c_int ;
984
1042
}
985
1043
986
1044
#[ link( name = "util" ) ]
0 commit comments