From a633acd068975300313343789914a1ef8dedac84 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Sat, 24 Feb 2024 17:42:57 +0100 Subject: [PATCH] improve compatibility to the BSD socket layer - add missing constants --- hermit-abi/Cargo.toml | 2 +- hermit-abi/src/lib.rs | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/hermit-abi/Cargo.toml b/hermit-abi/Cargo.toml index 04b6ea8ec..3fec2f17d 100644 --- a/hermit-abi/Cargo.toml +++ b/hermit-abi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hermit-abi" -version = "0.3.7" +version = "0.3.8" authors = ["Stefan Lankes"] license = "MIT OR Apache-2.0" edition = "2021" diff --git a/hermit-abi/src/lib.rs b/hermit-abi/src/lib.rs index 62ac67e18..482ab2b3e 100644 --- a/hermit-abi/src/lib.rs +++ b/hermit-abi/src/lib.rs @@ -134,12 +134,15 @@ pub const SOCK_STREAM: i32 = 1; pub const SOCK_NONBLOCK: i32 = 0o4000; pub const SOCK_CLOEXEC: i32 = 0o40000; pub const SOL_SOCKET: i32 = 4095; -pub const SO_BROADCAST: i32 = 32; -pub const SO_ERROR: i32 = 4103; -pub const SO_RCVTIMEO: i32 = 4102; -pub const SO_REUSEADDR: i32 = 4; -pub const SO_SNDTIMEO: i32 = 4101; -pub const SO_LINGER: i32 = 128; +pub const SO_REUSEADDR: i32 = 0x0004; +pub const SO_KEEPALIVE: i32 = 0x0008; +pub const SO_BROADCAST: i32 = 0x0020; +pub const SO_LINGER: i32 = 0x0080; +pub const SO_SNDBUF: i32 = 0x1001; +pub const SO_RCVBUF: i32 = 0x1002; +pub const SO_SNDTIMEO: i32 = 0x1005; +pub const SO_RCVTIMEO: i32 = 0x1006; +pub const SO_ERROR: i32 = 0x1007; pub const TCP_NODELAY: i32 = 1; pub const MSG_PEEK: i32 = 1; pub const FIONBIO: i32 = 0x8008667eu32 as i32;