Skip to content

Commit f7db08b

Browse files
committed
Add OpenBSD compatibility to socket options
1 parent 6844cfb commit f7db08b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/sys/socket/consts.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,10 @@ mod os {
178178
pub const SO_REUSEPORT: c_int = libc::SO_REUSEPORT;
179179
pub const SO_REUSESHAREUID: c_int = 0x1025;
180180
pub const SO_SNDBUF: c_int = libc::SO_SNDBUF;
181+
#[cfg(not(target_os = "openbsd"))]
181182
pub const SO_TIMESTAMP: c_int = libc::SO_TIMESTAMP;
183+
#[cfg(target_os = "openbsd")]
184+
pub const SO_TIMESTAMP: c_int = 0x0800;
182185
#[cfg(not(target_os = "netbsd"))]
183186
pub const SO_TIMESTAMP_MONOTONIC: c_int = 0x0800;
184187
pub const SO_TYPE: c_int = libc::SO_TYPE;

0 commit comments

Comments
 (0)