Skip to content

Commit b5c207a

Browse files
committed
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.
1 parent 2bafdcf commit b5c207a

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
@@ -3788,6 +3788,27 @@ pub const SCTP_PR_SCTP_ALL: ::c_int = 1 << 7;
37883788
pub const SCTP_NOTIFICATION: ::c_int = MSG_NOTIFICATION;
37893789
pub const SCTP_EOF: ::c_int = ::MSG_FIN;
37903790

3791+
/* DCCP socket options */
3792+
pub const DCCP_SOCKOPT_PACKET_SIZE: ::c_int = 1;
3793+
pub const DCCP_SOCKOPT_SERVICE: ::c_int = 2;
3794+
pub const DCCP_SOCKOPT_CHANGE_L: ::c_int = 3;
3795+
pub const DCCP_SOCKOPT_CHANGE_R: ::c_int = 4;
3796+
pub const DCCP_SOCKOPT_GET_CUR_MPS: ::c_int = 5;
3797+
pub const DCCP_SOCKOPT_SERVER_TIMEWAIT: ::c_int = 6;
3798+
pub const DCCP_SOCKOPT_SEND_CSCOV: ::c_int = 10;
3799+
pub const DCCP_SOCKOPT_RECV_CSCOV: ::c_int = 11;
3800+
pub const DCCP_SOCKOPT_AVAILABLE_CCIDS: ::c_int = 12;
3801+
pub const DCCP_SOCKOPT_CCID: ::c_int = 13;
3802+
pub const DCCP_SOCKOPT_TX_CCID: ::c_int = 14;
3803+
pub const DCCP_SOCKOPT_RX_CCID: ::c_int = 15;
3804+
pub const DCCP_SOCKOPT_QPOLICY_ID: ::c_int = 16;
3805+
pub const DCCP_SOCKOPT_QPOLICY_TXQLEN: ::c_int = 17;
3806+
pub const DCCP_SOCKOPT_CCID_RX_INFO: ::c_int = 128;
3807+
pub const DCCP_SOCKOPT_CCID_TX_INFO: ::c_int = 192;
3808+
3809+
/// maximum number of services provided on the same listening port
3810+
pub const DCCP_SERVICE_LIST_MAX_LEN: ::c_int = 32;
3811+
37913812
f! {
37923813
pub fn NLA_ALIGN(len: ::c_int) -> ::c_int {
37933814
return ((len) + NLA_ALIGNTO - 1) & !(NLA_ALIGNTO - 1)

0 commit comments

Comments
 (0)