Skip to content

Commit 71ec1cf

Browse files
committed
Auto merge of #3136 - nekopsykose:dccp, r=JohnTitor
linux: move DCCP_ constants from linux/gnu to linux closes #3132 these constants come from linux headers, so they should be exposed for "linux", not just glibc. this change exposes them for linux/musl and linux/uclibc. of note, android contains these same constants, but moving it to linux-like would also expose them on emscripten, which does not have it. (not sure if things are placed in the correct place, but this looks like an okayish start)
2 parents ad7bbf4 + b5c207a commit 71ec1cf

File tree

4 files changed

+38
-38
lines changed

4 files changed

+38
-38
lines changed

libc-test/semver/linux-gnu.txt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,6 @@ CGROUP2_SUPER_MAGIC
3333
CGROUP_SUPER_MAGIC
3434
CODA_SUPER_MAGIC
3535
CRAMFS_MAGIC
36-
DCCP_SERVICE_LIST_MAX_LEN
37-
DCCP_SOCKOPT_AVAILABLE_CCIDS
38-
DCCP_SOCKOPT_CCID
39-
DCCP_SOCKOPT_CCID_RX_INFO
40-
DCCP_SOCKOPT_CCID_TX_INFO
41-
DCCP_SOCKOPT_CHANGE_L
42-
DCCP_SOCKOPT_CHANGE_R
43-
DCCP_SOCKOPT_GET_CUR_MPS
44-
DCCP_SOCKOPT_PACKET_SIZE
45-
DCCP_SOCKOPT_QPOLICY_ID
46-
DCCP_SOCKOPT_QPOLICY_TXQLEN
47-
DCCP_SOCKOPT_RECV_CSCOV
48-
DCCP_SOCKOPT_RX_CCID
49-
DCCP_SOCKOPT_SEND_CSCOV
50-
DCCP_SOCKOPT_SERVER_TIMEWAIT
51-
DCCP_SOCKOPT_SERVICE
52-
DCCP_SOCKOPT_TX_CCID
5336
DEAD_PROCESS
5437
DEBUGFS_MAGIC
5538
DEVPTS_SUPER_MAGIC

libc-test/semver/linux.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,23 @@ DAY_4
334334
DAY_5
335335
DAY_6
336336
DAY_7
337+
DCCP_SERVICE_LIST_MAX_LEN
338+
DCCP_SOCKOPT_AVAILABLE_CCIDS
339+
DCCP_SOCKOPT_CCID
340+
DCCP_SOCKOPT_CCID_RX_INFO
341+
DCCP_SOCKOPT_CCID_TX_INFO
342+
DCCP_SOCKOPT_CHANGE_L
343+
DCCP_SOCKOPT_CHANGE_R
344+
DCCP_SOCKOPT_GET_CUR_MPS
345+
DCCP_SOCKOPT_PACKET_SIZE
346+
DCCP_SOCKOPT_QPOLICY_ID
347+
DCCP_SOCKOPT_QPOLICY_TXQLEN
348+
DCCP_SOCKOPT_RECV_CSCOV
349+
DCCP_SOCKOPT_RX_CCID
350+
DCCP_SOCKOPT_SEND_CSCOV
351+
DCCP_SOCKOPT_SERVER_TIMEWAIT
352+
DCCP_SOCKOPT_SERVICE
353+
DCCP_SOCKOPT_TX_CCID
337354
DT_UNKNOWN
338355
D_FMT
339356
D_T_FMT

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -730,27 +730,6 @@ pub const PF_NFC: ::c_int = AF_NFC;
730730
pub const PF_VSOCK: ::c_int = AF_VSOCK;
731731
pub const PF_XDP: ::c_int = AF_XDP;
732732

733-
/* DCCP socket options */
734-
pub const DCCP_SOCKOPT_PACKET_SIZE: ::c_int = 1;
735-
pub const DCCP_SOCKOPT_SERVICE: ::c_int = 2;
736-
pub const DCCP_SOCKOPT_CHANGE_L: ::c_int = 3;
737-
pub const DCCP_SOCKOPT_CHANGE_R: ::c_int = 4;
738-
pub const DCCP_SOCKOPT_GET_CUR_MPS: ::c_int = 5;
739-
pub const DCCP_SOCKOPT_SERVER_TIMEWAIT: ::c_int = 6;
740-
pub const DCCP_SOCKOPT_SEND_CSCOV: ::c_int = 10;
741-
pub const DCCP_SOCKOPT_RECV_CSCOV: ::c_int = 11;
742-
pub const DCCP_SOCKOPT_AVAILABLE_CCIDS: ::c_int = 12;
743-
pub const DCCP_SOCKOPT_CCID: ::c_int = 13;
744-
pub const DCCP_SOCKOPT_TX_CCID: ::c_int = 14;
745-
pub const DCCP_SOCKOPT_RX_CCID: ::c_int = 15;
746-
pub const DCCP_SOCKOPT_QPOLICY_ID: ::c_int = 16;
747-
pub const DCCP_SOCKOPT_QPOLICY_TXQLEN: ::c_int = 17;
748-
pub const DCCP_SOCKOPT_CCID_RX_INFO: ::c_int = 128;
749-
pub const DCCP_SOCKOPT_CCID_TX_INFO: ::c_int = 192;
750-
751-
/// maximum number of services provided on the same listening port
752-
pub const DCCP_SERVICE_LIST_MAX_LEN: ::c_int = 32;
753-
754733
pub const SIGEV_THREAD_ID: ::c_int = 4;
755734

756735
pub const BUFSIZ: ::c_uint = 8192;

src/unix/linux_like/linux/mod.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3800,6 +3800,27 @@ pub const SCTP_PR_SCTP_ALL: ::c_int = 1 << 7;
38003800
pub const SCTP_NOTIFICATION: ::c_int = MSG_NOTIFICATION;
38013801
pub const SCTP_EOF: ::c_int = ::MSG_FIN;
38023802

3803+
/* DCCP socket options */
3804+
pub const DCCP_SOCKOPT_PACKET_SIZE: ::c_int = 1;
3805+
pub const DCCP_SOCKOPT_SERVICE: ::c_int = 2;
3806+
pub const DCCP_SOCKOPT_CHANGE_L: ::c_int = 3;
3807+
pub const DCCP_SOCKOPT_CHANGE_R: ::c_int = 4;
3808+
pub const DCCP_SOCKOPT_GET_CUR_MPS: ::c_int = 5;
3809+
pub const DCCP_SOCKOPT_SERVER_TIMEWAIT: ::c_int = 6;
3810+
pub const DCCP_SOCKOPT_SEND_CSCOV: ::c_int = 10;
3811+
pub const DCCP_SOCKOPT_RECV_CSCOV: ::c_int = 11;
3812+
pub const DCCP_SOCKOPT_AVAILABLE_CCIDS: ::c_int = 12;
3813+
pub const DCCP_SOCKOPT_CCID: ::c_int = 13;
3814+
pub const DCCP_SOCKOPT_TX_CCID: ::c_int = 14;
3815+
pub const DCCP_SOCKOPT_RX_CCID: ::c_int = 15;
3816+
pub const DCCP_SOCKOPT_QPOLICY_ID: ::c_int = 16;
3817+
pub const DCCP_SOCKOPT_QPOLICY_TXQLEN: ::c_int = 17;
3818+
pub const DCCP_SOCKOPT_CCID_RX_INFO: ::c_int = 128;
3819+
pub const DCCP_SOCKOPT_CCID_TX_INFO: ::c_int = 192;
3820+
3821+
/// maximum number of services provided on the same listening port
3822+
pub const DCCP_SERVICE_LIST_MAX_LEN: ::c_int = 32;
3823+
38033824
f! {
38043825
pub fn NLA_ALIGN(len: ::c_int) -> ::c_int {
38053826
return ((len) + NLA_ALIGNTO - 1) & !(NLA_ALIGNTO - 1)

0 commit comments

Comments
 (0)