Skip to content

Commit 76bf829

Browse files
committed
define INADDR_* constants in unix platforms
1 parent 6c660c9 commit 76bf829

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/unix/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,11 @@ pub const IPPROTO_UDP: ::c_int = 17;
224224
pub const IPPROTO_IP: ::c_int = 0;
225225
pub const IPPROTO_IPV6: ::c_int = 41;
226226

227+
pub const INADDR_LOOPBACK: ::c_int = 2130706433;
228+
pub const INADDR_ANY: ::c_int = 0;
229+
pub const INADDR_BROADCAST: ::c_int = 4294967295;
230+
pub const INADDR_NONE: ::c_int = 4294967295;
231+
227232
cfg_if! {
228233
if #[cfg(dox)] {
229234
// on dox builds don't pull in anything

src/unix/newlib/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -506,11 +506,6 @@ pub const SO_ERROR: ::c_int = 4105;
506506

507507
pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC;
508508

509-
pub const INADDR_LOOPBACK: ::c_int = 2130706433;
510-
pub const INADDR_ANY: ::c_int = 0;
511-
pub const INADDR_BROADCAST: ::c_int = 4294967295;
512-
pub const INADDR_NONE: ::c_int = 4294967295;
513-
514509
pub const INET_ADDRSTRLEN: ::c_int = 16;
515510

516511
pub const IPPROTO_IP: ::c_int = 0;

0 commit comments

Comments
 (0)