Skip to content

Commit a422e34

Browse files
committed
Add explanation for ai_addr field.
1 parent 0dec549 commit a422e34

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/unix/linux_like/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ s! {
5050
pub sin6_scope_id: u32,
5151
}
5252

53+
// The order of the `ai_addr` field in this struct is crucial
54+
// for converting between the Rust and C types.
5355
pub struct addrinfo {
5456
pub ai_flags: ::c_int,
5557
pub ai_family: ::c_int,

src/unix/newlib/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ pub type time_t = i32;
2424
pub type useconds_t = u32;
2525

2626
s! {
27+
// The order of the `ai_addr` field in this struct is crucial
28+
// for converting between the Rust and C types.
2729
pub struct addrinfo {
2830
pub ai_flags: ::c_int,
2931
pub ai_family: ::c_int,

0 commit comments

Comments
 (0)