Skip to content

Commit 280976e

Browse files
committed
fix struct arphdr alignment on OpenBSD
1 parent 9d203f5 commit 280976e

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

src/unix/bsd/netbsdlike/mod.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,6 @@ s! {
5757
pub l_type: ::c_short,
5858
pub l_whence: ::c_short,
5959
}
60-
61-
#[repr(packed)]
62-
pub struct arphdr {
63-
pub ar_hrd: u16,
64-
pub ar_pro: u16,
65-
pub ar_hln: u8,
66-
pub ar_pln: u8,
67-
pub ar_op: u16,
68-
}
6960
}
7061

7162
pub const D_T_FMT: ::nl_item = 0;

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,15 @@ s! {
318318
pub ipi_addr: ::in_addr,
319319
pub ipi_ifindex: ::c_uint,
320320
}
321+
322+
#[repr(packed)]
323+
pub struct arphdr {
324+
pub ar_hrd: u16,
325+
pub ar_pro: u16,
326+
pub ar_hln: u8,
327+
pub ar_pln: u8,
328+
pub ar_op: u16,
329+
}
321330
}
322331

323332
pub const AT_FDCWD: ::c_int = -100;

src/unix/bsd/netbsdlike/openbsdlike/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,14 @@ s! {
193193
pub gid: ::gid_t,
194194
pub pid: ::pid_t,
195195
}
196+
197+
pub struct arphdr {
198+
pub ar_hrd: u16,
199+
pub ar_pro: u16,
200+
pub ar_hln: u8,
201+
pub ar_pln: u8,
202+
pub ar_op: u16,
203+
}
196204
}
197205

198206
pub const UT_NAMESIZE: usize = 32;

0 commit comments

Comments
 (0)