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 @@ -3964,6 +3964,12 @@ fn test_linux(target: &str) {
3964
3964
if loongarch64 && ( name == "MFD_NOEXEC_SEAL" || name == "MFD_EXEC" ) {
3965
3965
return true ;
3966
3966
}
3967
+ // FIXME(musl): Requires musl >= 1.2
3968
+ if name == "SO_PREFER_BUSY_POLL"
3969
+ || name == "SO_BUSY_POLL_BUDGET"
3970
+ {
3971
+ return true ;
3972
+ }
3967
3973
}
3968
3974
match name {
3969
3975
// These constants are not available if gnu headers have been included
Original file line number Diff line number Diff line change @@ -2895,6 +2895,7 @@ SOL_X25
2895
2895
SOMAXCONN
2896
2896
SO_BINDTODEVICE
2897
2897
SO_BUSY_POLL
2898
+ SO_BUSY_POLL_BUDGET
2898
2899
SO_DOMAIN
2899
2900
SO_EE_OFFENDER
2900
2901
SO_EE_ORIGIN_ICMP
@@ -2914,6 +2915,7 @@ SO_PASSSEC
2914
2915
SO_PEEK_OFF
2915
2916
SO_PEERCRED
2916
2917
SO_PEERSEC
2918
+ SO_PREFER_BUSY_POLL
2917
2919
SO_RCVBUFFORCE
2918
2920
SO_REUSEPORT
2919
2921
SO_RXQ_OVFL
Original file line number Diff line number Diff line change @@ -102,6 +102,11 @@ cfg_if! {
102
102
target_arch = "csky" ,
103
103
target_arch = "loongarch64"
104
104
) ,
105
+ // FIXME(musl):
106
+ // Musl hardcodes the SO_* constants instead
107
+ // of inheriting them from the kernel headers.
108
+ // For new constants you might need consider updating
109
+ // musl in the CI as well.
105
110
not( any( target_env = "musl" , target_env = "ohos" ) )
106
111
) ) ] {
107
112
pub const SO_TIMESTAMP_NEW : c_int = 63 ;
@@ -112,8 +117,8 @@ cfg_if! {
112
117
pub const SO_DETACH_REUSEPORT_BPF : c_int = 68 ;
113
118
}
114
119
}
115
- // pub const SO_PREFER_BUSY_POLL: c_int = 69;
116
- // pub const SO_BUSY_POLL_BUDGET: c_int = 70;
120
+ pub const SO_PREFER_BUSY_POLL : c_int = 69 ;
121
+ pub const SO_BUSY_POLL_BUDGET : c_int = 70 ;
117
122
118
123
cfg_if ! {
119
124
if #[ cfg( any(
Original file line number Diff line number Diff line change @@ -102,8 +102,8 @@ pub const SO_TIMESTAMPING: c_int = 37;
102
102
// pub const SO_RCVTIMEO_NEW: c_int = 66;
103
103
// pub const SO_SNDTIMEO_NEW: c_int = 67;
104
104
// pub const SO_DETACH_REUSEPORT_BPF: c_int = 68;
105
- // pub const SO_PREFER_BUSY_POLL: c_int = 69;
106
- // pub const SO_BUSY_POLL_BUDGET: c_int = 70;
105
+ pub const SO_PREFER_BUSY_POLL : c_int = 69 ;
106
+ pub const SO_BUSY_POLL_BUDGET : c_int = 70 ;
107
107
108
108
pub const FICLONE : c_ulong = 0x80049409 ;
109
109
pub const FICLONERANGE : c_ulong = 0x8020940D ;
Original file line number Diff line number Diff line change @@ -84,8 +84,8 @@ pub const SO_BINDTOIFINDEX: c_int = 62;
84
84
// pub const SO_RCVTIMEO_NEW: c_int = 66;
85
85
// pub const SO_SNDTIMEO_NEW: c_int = 67;
86
86
// pub const SO_DETACH_REUSEPORT_BPF: c_int = 68;
87
- // pub const SO_PREFER_BUSY_POLL: c_int = 69;
88
- // pub const SO_BUSY_POLL_BUDGET: c_int = 70;
87
+ pub const SO_PREFER_BUSY_POLL : c_int = 69 ;
88
+ pub const SO_BUSY_POLL_BUDGET : c_int = 70 ;
89
89
90
90
pub const FICLONE : c_ulong = 0x80049409 ;
91
91
pub const FICLONERANGE : c_ulong = 0x8020940D ;
Original file line number Diff line number Diff line change @@ -94,8 +94,8 @@ pub const SO_TIMESTAMPING: c_int = 0x0023;
94
94
// pub const SO_RCVTIMEO_NEW: c_int = 0x0044;
95
95
// pub const SO_SNDTIMEO_NEW: c_int = 0x0045;
96
96
// pub const SO_DETACH_REUSEPORT_BPF: c_int = 0x0047;
97
- // pub const SO_PREFER_BUSY_POLL: c_int = 0x0048;
98
- // pub const SO_BUSY_POLL_BUDGET: c_int = 0x0049;
97
+ pub const SO_PREFER_BUSY_POLL : c_int = 0x0048 ;
98
+ pub const SO_BUSY_POLL_BUDGET : c_int = 0x0049 ;
99
99
100
100
// Defined in unix/linux_like/mod.rs
101
101
// pub const SCM_TIMESTAMP: c_int = SO_TIMESTAMP;
You can’t perform that action at this time.
0 commit comments