diff --git a/libc-test/build.rs b/libc-test/build.rs index 0b912c94d1b4b..c319cfa0cc111 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -3495,7 +3495,8 @@ fn test_linux(target: &str) { "type_" if struct_ == "input_event" || struct_ == "input_mask" - || struct_ == "ff_effect" => + || struct_ == "ff_effect" + || struct_ == "fanotify_response_info_header" => { "type".to_string() } diff --git a/libc-test/semver/linux.txt b/libc-test/semver/linux.txt index fa74075e418a0..802710fc6ec79 100644 --- a/libc-test/semver/linux.txt +++ b/libc-test/semver/linux.txt @@ -1423,6 +1423,7 @@ MAP_STACK MAP_TYPE MAXTTL MAX_ADDR_LEN +MAX_HANDLE_SZ MAX_IPOPTLEN MCAST_BLOCK_SOURCE MCAST_EXCLUDE @@ -3435,10 +3436,16 @@ execvpe faccessat fallocate fallocate64 +fanotify_event_info_error +fanotify_event_info_fid +fanotify_event_info_header +fanotify_event_info_pidfd fanotify_event_metadata fanotify_init fanotify_mark fanotify_response +fanotify_response_info_header +fanotify_response_info_audit_rule fchdir fdatasync fdopendir diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index 5d5b7c119e0af..aee65250ebf84 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -503,9 +503,45 @@ s! { pub len: u32 } + pub struct fanotify_event_info_header { + pub info_type: ::__u8, + _pad: ::__u8, + pub len: ::__u16, + } + + pub struct fanotify_event_info_fid { + pub hdr: fanotify_event_info_header, + pub fsid: ::fsid_t, + pub handle: [::c_uchar; 0], + } + + pub struct fanotify_event_info_pidfd { + pub hdr: fanotify_event_info_header, + pub pidfd: ::__s32, + } + + pub struct fanotify_event_info_error { + pub hdr: fanotify_event_info_header, + pub error: ::__s32, + pub error_count: ::__u32, + } + pub struct fanotify_response { pub fd: ::c_int, - pub response: __u32, + pub response: ::__u32, + } + + pub struct fanotify_response_info_header { + pub type_: ::__u8, + pub pad: ::__u8, + pub len: ::__u16, + } + + pub struct fanotify_response_info_audit_rule { + pub hdr: fanotify_response_info_header, + pub rule_number: ::__u32, + pub subj_trust: ::__u32, + pub obj_trust: ::__u32, } pub struct sockaddr_vm {