File tree Expand file tree Collapse file tree 6 files changed +21
-8
lines changed
src/unix/linux_like/linux/arch Expand file tree Collapse file tree 6 files changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -3989,6 +3989,12 @@ fn test_linux(target: &str) {
39893989 if loongarch64 && ( name == "MFD_NOEXEC_SEAL" || name == "MFD_EXEC" ) {
39903990 return true ;
39913991 }
3992+ // FIXME(musl): Requires musl >= 1.2
3993+ if name == "SO_PREFER_BUSY_POLL"
3994+ || name == "SO_BUSY_POLL_BUDGET"
3995+ {
3996+ return true ;
3997+ }
39923998 }
39933999 match name {
39944000 // These constants are not available if gnu headers have been included
Original file line number Diff line number Diff line change @@ -2954,6 +2954,7 @@ SOL_XDP
29542954SOMAXCONN
29552955SO_BINDTODEVICE
29562956SO_BUSY_POLL
2957+ SO_BUSY_POLL_BUDGET
29572958SO_DOMAIN
29582959SO_EE_OFFENDER
29592960SO_EE_ORIGIN_ICMP
@@ -2973,6 +2974,7 @@ SO_PASSSEC
29732974SO_PEEK_OFF
29742975SO_PEERCRED
29752976SO_PEERSEC
2977+ SO_PREFER_BUSY_POLL
29762978SO_RCVBUFFORCE
29772979SO_REUSEPORT
29782980SO_RXQ_OVFL
Original file line number Diff line number Diff line change @@ -130,6 +130,11 @@ cfg_if! {
130130 target_arch = "csky" ,
131131 target_arch = "loongarch64"
132132 ) ,
133+ // FIXME(musl):
134+ // Musl hardcodes the SO_* constants instead
135+ // of inheriting them from the kernel headers.
136+ // For new constants you might need consider updating
137+ // musl in the CI as well.
133138 not( any( target_env = "musl" , target_env = "ohos" ) )
134139 ) ) ] {
135140 pub const SO_TIMESTAMP_NEW : c_int = 63 ;
@@ -140,8 +145,8 @@ cfg_if! {
140145 pub const SO_DETACH_REUSEPORT_BPF : c_int = 68 ;
141146 }
142147}
143- // pub const SO_PREFER_BUSY_POLL: c_int = 69;
144- // pub const SO_BUSY_POLL_BUDGET: c_int = 70;
148+ pub const SO_PREFER_BUSY_POLL : c_int = 69 ;
149+ pub const SO_BUSY_POLL_BUDGET : c_int = 70 ;
145150
146151cfg_if ! {
147152 if #[ cfg( any(
Original file line number Diff line number Diff line change @@ -118,8 +118,8 @@ cfg_if! {
118118 }
119119}
120120// pub const SO_DETACH_REUSEPORT_BPF: c_int = 68;
121- // pub const SO_PREFER_BUSY_POLL: c_int = 69;
122- // pub const SO_BUSY_POLL_BUDGET: c_int = 70;
121+ pub const SO_PREFER_BUSY_POLL : c_int = 69 ;
122+ pub const SO_BUSY_POLL_BUDGET : c_int = 70 ;
123123
124124pub const FICLONE : c_ulong = 0x80049409 ;
125125pub const FICLONERANGE : c_ulong = 0x8020940D ;
Original file line number Diff line number Diff line change @@ -100,8 +100,8 @@ const SO_TIMESTAMPING_NEW: c_int = 65;
100100const SO_RCVTIMEO_NEW : c_int = 66 ;
101101const SO_SNDTIMEO_NEW : c_int = 67 ;
102102// pub const SO_DETACH_REUSEPORT_BPF: c_int = 68;
103- // pub const SO_PREFER_BUSY_POLL: c_int = 69;
104- // pub const SO_BUSY_POLL_BUDGET: c_int = 70;
103+ pub const SO_PREFER_BUSY_POLL : c_int = 69 ;
104+ pub const SO_BUSY_POLL_BUDGET : c_int = 70 ;
105105
106106pub const FICLONE : c_ulong = 0x80049409 ;
107107pub const FICLONERANGE : c_ulong = 0x8020940D ;
Original file line number Diff line number Diff line change @@ -95,8 +95,8 @@ pub const SO_TIMESTAMPING: c_int = 0x0023;
9595// pub const SO_RCVTIMEO_NEW: c_int = 0x0044;
9696// pub const SO_SNDTIMEO_NEW: c_int = 0x0045;
9797// pub const SO_DETACH_REUSEPORT_BPF: c_int = 0x0047;
98- // pub const SO_PREFER_BUSY_POLL: c_int = 0x0048;
99- // pub const SO_BUSY_POLL_BUDGET: c_int = 0x0049;
98+ pub const SO_PREFER_BUSY_POLL : c_int = 0x0048 ;
99+ pub const SO_BUSY_POLL_BUDGET : c_int = 0x0049 ;
100100
101101// Defined in unix/linux_like/mod.rs
102102// pub const SCM_TIMESTAMP: c_int = SO_TIMESTAMP;
You can’t perform that action at this time.
0 commit comments