File tree 6 files changed +21
-8
lines changed
src/unix/linux_like/linux/arch
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) {
3989
3989
if loongarch64 && ( name == "MFD_NOEXEC_SEAL" || name == "MFD_EXEC" ) {
3990
3990
return true ;
3991
3991
}
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
+ }
3992
3998
}
3993
3999
match name {
3994
4000
// 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
2954
2954
SOMAXCONN
2955
2955
SO_BINDTODEVICE
2956
2956
SO_BUSY_POLL
2957
+ SO_BUSY_POLL_BUDGET
2957
2958
SO_DOMAIN
2958
2959
SO_EE_OFFENDER
2959
2960
SO_EE_ORIGIN_ICMP
@@ -2973,6 +2974,7 @@ SO_PASSSEC
2973
2974
SO_PEEK_OFF
2974
2975
SO_PEERCRED
2975
2976
SO_PEERSEC
2977
+ SO_PREFER_BUSY_POLL
2976
2978
SO_RCVBUFFORCE
2977
2979
SO_REUSEPORT
2978
2980
SO_RXQ_OVFL
Original file line number Diff line number Diff line change @@ -130,6 +130,11 @@ cfg_if! {
130
130
target_arch = "csky" ,
131
131
target_arch = "loongarch64"
132
132
) ,
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.
133
138
not( any( target_env = "musl" , target_env = "ohos" ) )
134
139
) ) ] {
135
140
pub const SO_TIMESTAMP_NEW : c_int = 63 ;
@@ -140,8 +145,8 @@ cfg_if! {
140
145
pub const SO_DETACH_REUSEPORT_BPF : c_int = 68 ;
141
146
}
142
147
}
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 ;
145
150
146
151
cfg_if ! {
147
152
if #[ cfg( any(
Original file line number Diff line number Diff line change @@ -118,8 +118,8 @@ cfg_if! {
118
118
}
119
119
}
120
120
// 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 ;
123
123
124
124
pub const FICLONE : c_ulong = 0x80049409 ;
125
125
pub 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;
100
100
const SO_RCVTIMEO_NEW : c_int = 66 ;
101
101
const SO_SNDTIMEO_NEW : c_int = 67 ;
102
102
// 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 ;
105
105
106
106
pub const FICLONE : c_ulong = 0x80049409 ;
107
107
pub 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;
95
95
// pub const SO_RCVTIMEO_NEW: c_int = 0x0044;
96
96
// pub const SO_SNDTIMEO_NEW: c_int = 0x0045;
97
97
// 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 ;
100
100
101
101
// Defined in unix/linux_like/mod.rs
102
102
// pub const SCM_TIMESTAMP: c_int = SO_TIMESTAMP;
You can’t perform that action at this time.
0 commit comments