diff --git a/src/platform/src/types.rs b/src/platform/src/types.rs index 3299c43564..5de5a29daa 100644 --- a/src/platform/src/types.rs +++ b/src/platform/src/types.rs @@ -131,6 +131,19 @@ pub struct sockaddr { pub data: [c_char; 14], } +#[repr(C)] +#[derive(Debug, Clone, Copy)] +pub struct in_addr { + pub s_addr: in_addr_t +} + +#[repr(C)] +pub struct sockaddr_in { + pub sin_family: sa_family_t, + pub sin_port: in_port_t, + pub sin_addr: in_addr +} + #[repr(C)] pub struct sigaction { pub sa_handler: extern "C" fn(c_int),