Skip to content

Commit 9e94d5b

Browse files
committed
Pull sockaddr_nl up a layer as it is present for Android
The addition of sockaddr_nl seems to be a fairly recent addition to bionic, although it would appear that its lack of presence in previous versions is more of an oversight than anything else. https://github.com/android/platform_bionic/blob/831c8a52498d3c7be204a00847275f6e9163626f/libc/kernel/uapi/linux/netlink.h#L54 This change is motivated by failures to build nix under Android. Signed-off-by: Paul Osborne <[email protected]>
1 parent 493d79b commit 9e94d5b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/unix/notbsd/linux/mod.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,6 @@ s! {
126126
__f_spare: [::c_int; 6],
127127
}
128128

129-
pub struct sockaddr_nl {
130-
pub nl_family: ::sa_family_t,
131-
nl_pad: ::c_ushort,
132-
pub nl_pid: u32,
133-
pub nl_groups: u32
134-
}
135-
136129
pub struct dqblk {
137130
pub dqb_bhardlimit: ::uint64_t,
138131
pub dqb_bsoftlimit: ::uint64_t,

src/unix/notbsd/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ s! {
6161
pub ai_next: *mut addrinfo,
6262
}
6363

64+
pub struct sockaddr_nl {
65+
pub nl_family: ::sa_family_t,
66+
nl_pad: ::c_ushort,
67+
pub nl_pid: u32,
68+
pub nl_groups: u32
69+
}
70+
6471
pub struct sockaddr_ll {
6572
pub sll_family: ::c_ushort,
6673
pub sll_protocol: ::c_ushort,

0 commit comments

Comments
 (0)