From 6a04eb97ebbe569ef615685c61db967c7ce6129c Mon Sep 17 00:00:00 2001 From: ru Date: Wed, 29 Jan 2020 14:18:30 +0100 Subject: [PATCH 1/3] structs nlmsghdr, nlmsgerr and nlattr added to linux mips musl target --- src/unix/linux_like/linux/musl/b32/mips/mod.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/unix/linux_like/linux/musl/b32/mips/mod.rs b/src/unix/linux_like/linux/musl/b32/mips/mod.rs index be11341683f15..7b5f628721a3b 100644 --- a/src/unix/linux_like/linux/musl/b32/mips/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/mips/mod.rs @@ -161,6 +161,24 @@ s! { pub f_namemax: ::c_ulong, __f_spare: [::c_int; 6], } + + pub struct nlmsghdr { + pub nlmsg_len: u32, + pub nlmsg_type: u16, + pub nlmsg_flags: u16, + pub nlmsg_seq: u32, + pub nlmsg_pid: u32, + } + + pub struct nlmsgerr { + pub error: ::c_int, + pub msg: nlmsghdr, + } + + pub struct nlattr { + pub nla_len: u16, + pub nla_type: u16, + } } pub const SIGSTKSZ: ::size_t = 8192; From 1d43891df2e55926e6d28d8af9254b135ce7bab2 Mon Sep 17 00:00:00 2001 From: ru Date: Fri, 31 Jan 2020 11:52:36 +0100 Subject: [PATCH 2/3] structs nlmsghdr, nlmsgerr and nlattr added to linux mips64 musl target --- src/unix/linux_like/linux/musl/b64/mips64.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/unix/linux_like/linux/musl/b64/mips64.rs b/src/unix/linux_like/linux/musl/b64/mips64.rs index 2c410509fa76e..b06ee1872fb56 100644 --- a/src/unix/linux_like/linux/musl/b64/mips64.rs +++ b/src/unix/linux_like/linux/musl/b64/mips64.rs @@ -83,6 +83,24 @@ s! { pub f_spare: [::c_ulong; 5], } + pub struct nlmsghdr { + pub nlmsg_len: u32, + pub nlmsg_type: u16, + pub nlmsg_flags: u16, + pub nlmsg_seq: u32, + pub nlmsg_pid: u32, + } + + pub struct nlmsgerr { + pub error: ::c_int, + pub msg: nlmsghdr, + } + + pub struct nlattr { + pub nla_len: u16, + pub nla_type: u16, + } + pub struct ipc_perm { pub __ipc_perm_key: ::key_t, pub uid: ::uid_t, From 5472ccded8e88e84f2fa7c8e43971a1537f24acf Mon Sep 17 00:00:00 2001 From: ru Date: Fri, 7 Feb 2020 14:34:15 +0100 Subject: [PATCH 3/3] structs nlmsghdr, nlmsgerr and nlattr added to linux arm and x86 musl targets --- src/unix/linux_like/linux/musl/b32/arm/mod.rs | 18 ++++++++++++++++++ src/unix/linux_like/linux/musl/b32/x86/mod.rs | 18 ++++++++++++++++++ .../linux_like/linux/musl/b64/x86_64/mod.rs | 18 ++++++++++++++++++ 3 files changed, 54 insertions(+) diff --git a/src/unix/linux_like/linux/musl/b32/arm/mod.rs b/src/unix/linux_like/linux/musl/b32/arm/mod.rs index ff23688734721..ca0810bf226b6 100644 --- a/src/unix/linux_like/linux/musl/b32/arm/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/arm/mod.rs @@ -150,6 +150,24 @@ s! { pub f_namemax: ::c_ulong, __f_spare: [::c_int; 6], } + + pub struct nlmsghdr { + pub nlmsg_len: u32, + pub nlmsg_type: u16, + pub nlmsg_flags: u16, + pub nlmsg_seq: u32, + pub nlmsg_pid: u32, + } + + pub struct nlmsgerr { + pub error: ::c_int, + pub msg: nlmsghdr, + } + + pub struct nlattr { + pub nla_len: u16, + pub nla_type: u16, + } } pub const SIGSTKSZ: ::size_t = 8192; diff --git a/src/unix/linux_like/linux/musl/b32/x86/mod.rs b/src/unix/linux_like/linux/musl/b32/x86/mod.rs index fcd8ae4117b0b..e92d2dd69ae3a 100644 --- a/src/unix/linux_like/linux/musl/b32/x86/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/x86/mod.rs @@ -154,6 +154,24 @@ s! { pub f_namemax: ::c_ulong, __f_spare: [::c_int; 6], } + + pub struct nlmsghdr { + pub nlmsg_len: u32, + pub nlmsg_type: u16, + pub nlmsg_flags: u16, + pub nlmsg_seq: u32, + pub nlmsg_pid: u32, + } + + pub struct nlmsgerr { + pub error: ::c_int, + pub msg: nlmsghdr, + } + + pub struct nlattr { + pub nla_len: u16, + pub nla_type: u16, + } } s_no_extra_traits! { diff --git a/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs b/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs index ff9300c85f393..7de6f3d42a8cc 100644 --- a/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs @@ -48,6 +48,24 @@ s! { __reserved: [::c_long; 3], } + pub struct nlmsghdr { + pub nlmsg_len: u32, + pub nlmsg_type: u16, + pub nlmsg_flags: u16, + pub nlmsg_seq: u32, + pub nlmsg_pid: u32, + } + + pub struct nlmsgerr { + pub error: ::c_int, + pub msg: nlmsghdr, + } + + pub struct nlattr { + pub nla_len: u16, + pub nla_type: u16, + } + pub struct user_regs_struct { pub r15: ::c_ulong, pub r14: ::c_ulong,