forked from rust-lang/libc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add IN6ADDR_ANY_INIT, IN6ADDR_LOOPBACK_INIT, in6addr_any, in6addr_loo…
…pback (backport <rust-lang#3693>) [ move constants to the align module to support old rustc - Trevor ] (cherry picked from commit 8db9bc7)
- Loading branch information
1 parent
da92ffc
commit 46388e4
Showing
3 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
s! { | ||
#[repr(align(4))] | ||
pub struct in6_addr { | ||
pub s6_addr: [u8; 16], | ||
} | ||
} | ||
|
||
pub const IN6ADDR_LOOPBACK_INIT: in6_addr = in6_addr { | ||
s6_addr: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], | ||
}; | ||
|
||
pub const IN6ADDR_ANY_INIT: in6_addr = in6_addr { | ||
s6_addr: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
s! { | ||
pub struct in6_addr { | ||
pub s6_addr: [u8; 16], | ||
__align: [u32; 0], | ||
} | ||
} | ||
|
||
pub const IN6ADDR_LOOPBACK_INIT: in6_addr = in6_addr { | ||
s6_addr: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], | ||
__align: [0u32; 0], | ||
}; | ||
|
||
pub const IN6ADDR_ANY_INIT: in6_addr = in6_addr { | ||
s6_addr: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], | ||
__align: [0u32; 0], | ||
}; |