Skip to content

Commit a883b79

Browse files
authored
Merge pull request #4510 from Gelbpunkt/fanotify-event-metadata-musl
musl: Decommonize definition of fanotify_event_metadata
2 parents 14efd35 + 7559ba1 commit a883b79

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/unix/linux_like/linux/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,6 +1220,7 @@ s! {
12201220
size: [u8; crate::__SIZEOF_PTHREAD_BARRIERATTR_T],
12211221
}
12221222

1223+
#[cfg(not(target_env = "musl"))]
12231224
#[repr(align(8))]
12241225
pub struct fanotify_event_metadata {
12251226
pub event_len: __u32,

src/unix/linux_like/linux/musl/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,17 @@ impl siginfo_t {
122122
}
123123

124124
s! {
125+
#[repr(align(8))]
126+
pub struct fanotify_event_metadata {
127+
pub event_len: c_uint,
128+
pub vers: c_uchar,
129+
pub reserved: c_uchar,
130+
pub metadata_len: c_ushort,
131+
pub mask: c_ulonglong,
132+
pub fd: c_int,
133+
pub pid: c_int,
134+
}
135+
125136
// FIXME(1.0): This should not implement `PartialEq`
126137
#[allow(unpredictable_function_pointer_comparisons)]
127138
pub struct sigaction {

0 commit comments

Comments
 (0)