Skip to content

Commit

Permalink
Auto merge of #3316 - sunfishcode:sunfishcode/openbsd-socket-options,…
Browse files Browse the repository at this point in the history
… r=JohnTitor

Define `SO_PROTOCOL` and `SO_DOMAIN` on OpenBSD and Solarish.

This follows the definitions [here].

[here]: https://github.com/openbsd/src/blob/c5ac8393b86d7549b2b878fd46deeb0e8ee06ae0/sys/sys/socket.h#L116
  • Loading branch information
bors committed Aug 15, 2023
2 parents 19eaa81 + 4e664cc commit faa087c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libc-test/semver/openbsd.txt
Expand Up @@ -778,8 +778,10 @@ SOCK_RAW
SOCK_RDM
SOMAXCONN
SO_BINDANY
SO_DOMAIN
SO_NETPROC
SO_PEERCRED
SO_PROTOCOL
SO_RTABLE
SO_SPLICE
SO_TIMESTAMP
Expand Down
2 changes: 2 additions & 0 deletions src/unix/bsd/netbsdlike/openbsd/mod.rs
Expand Up @@ -999,6 +999,8 @@ pub const SO_NETPROC: ::c_int = 0x1020;
pub const SO_RTABLE: ::c_int = 0x1021;
pub const SO_PEERCRED: ::c_int = 0x1022;
pub const SO_SPLICE: ::c_int = 0x1023;
pub const SO_DOMAIN: ::c_int = 0x1024;
pub const SO_PROTOCOL: ::c_int = 0x1025;

// sys/netinet/in.h
// Protocols (RFC 1700)
Expand Down
2 changes: 2 additions & 0 deletions src/unix/solarish/mod.rs
Expand Up @@ -1825,6 +1825,8 @@ pub const SO_SNDTIMEO: ::c_int = 0x1005;
pub const SO_RCVTIMEO: ::c_int = 0x1006;
pub const SO_ERROR: ::c_int = 0x1007;
pub const SO_TYPE: ::c_int = 0x1008;
pub const SO_PROTOTYPE: ::c_int = 0x1009;
pub const SO_DOMAIN: ::c_int = 0x100c;
pub const SO_TIMESTAMP: ::c_int = 0x1013;

pub const SCM_RIGHTS: ::c_int = 0x1010;
Expand Down

0 comments on commit faa087c

Please sign in to comment.