File tree 3 files changed +23
-6
lines changed
src/unix/linux_like/linux/arch
3 files changed +23
-6
lines changed Original file line number Diff line number Diff line change @@ -57,13 +57,24 @@ const SO_TIMESTAMPING_OLD: c_int = 37;
57
57
cfg_if ! {
58
58
if #[ cfg( all(
59
59
linux_time_bits64,
60
- any( target_arch = "arm" , target_arch = "x86" )
60
+ any( target_arch = "arm" , target_arch = "x86" ) ,
61
+ not( any( target_env = "musl" , target_env = "ohos" ) )
61
62
) ) ] {
62
63
pub const SO_TIMESTAMP : c_int = SO_TIMESTAMP_NEW ;
63
64
pub const SO_TIMESTAMPNS : c_int = SO_TIMESTAMPNS_NEW ;
64
65
pub const SO_TIMESTAMPING : c_int = SO_TIMESTAMPING_NEW ;
65
66
pub const SO_RCVTIMEO : c_int = SO_RCVTIMEO_NEW ;
66
67
pub const SO_SNDTIMEO : c_int = SO_SNDTIMEO_NEW ;
68
+ } else if #[ cfg( all(
69
+ linux_time_bits64,
70
+ any( target_arch = "arm" , target_arch = "x86" ) ,
71
+ any( target_env = "musl" , target_env = "ohos" )
72
+ ) ) ] {
73
+ pub const SO_TIMESTAMP : c_int = 63 ;
74
+ pub const SO_TIMESTAMPNS : c_int = 64 ;
75
+ pub const SO_TIMESTAMPING : c_int = 65 ;
76
+ pub const SO_RCVTIMEO : c_int = 66 ;
77
+ pub const SO_SNDTIMEO : c_int = 67 ;
67
78
} else {
68
79
pub const SO_TIMESTAMP : c_int = SO_TIMESTAMP_OLD ;
69
80
pub const SO_TIMESTAMPNS : c_int = SO_TIMESTAMPNS_OLD ;
@@ -114,6 +125,7 @@ cfg_if! {
114
125
any(
115
126
target_arch = "x86" ,
116
127
target_arch = "x86_64" ,
128
+ target_arch = "arm" ,
117
129
target_arch = "aarch64" ,
118
130
target_arch = "csky" ,
119
131
target_arch = "loongarch64"
Original file line number Diff line number Diff line change @@ -99,8 +99,13 @@ pub const SO_BINDTOIFINDEX: c_int = 62;
99
99
// but CI haven't support them yet.
100
100
// Some related consts could be found in b32.rs and b64.rs
101
101
const SO_TIMESTAMP_OLD : c_int = 29 ;
102
+ const SO_RCVTIMEO_NEW : c_int = 66 ;
103
+ const SO_SNDTIMEO_NEW : c_int = 67 ;
102
104
const SO_TIMESTAMPNS_OLD : c_int = 35 ;
103
105
const SO_TIMESTAMPING_OLD : c_int = 37 ;
106
+ const SO_TIMESTAMP_NEW : c_int = 63 ;
107
+ const SO_TIMESTAMPNS_NEW : c_int = 64 ;
108
+ const SO_TIMESTAMPING_NEW : c_int = 65 ;
104
109
cfg_if ! {
105
110
if #[ cfg( linux_time_bits64) ] {
106
111
pub const SO_TIMESTAMP : c_int = SO_TIMESTAMP_NEW ;
Original file line number Diff line number Diff line change @@ -94,11 +94,11 @@ pub const SO_ZEROCOPY: c_int = 60;
94
94
pub const SO_TXTIME : c_int = 61 ;
95
95
pub const SCM_TXTIME : c_int = SO_TXTIME ;
96
96
pub const SO_BINDTOIFINDEX : c_int = 62 ;
97
- // pub const SO_TIMESTAMP_NEW: c_int = 63;
98
- // pub const SO_TIMESTAMPNS_NEW: c_int = 64;
99
- // pub const SO_TIMESTAMPING_NEW: c_int = 65;
100
- // pub const SO_RCVTIMEO_NEW: c_int = 66;
101
- // pub const SO_SNDTIMEO_NEW: c_int = 67;
97
+ const SO_TIMESTAMP_NEW : c_int = 63 ;
98
+ const SO_TIMESTAMPNS_NEW : c_int = 64 ;
99
+ const SO_TIMESTAMPING_NEW : c_int = 65 ;
100
+ const SO_RCVTIMEO_NEW : c_int = 66 ;
101
+ const SO_SNDTIMEO_NEW : c_int = 67 ;
102
102
// pub const SO_DETACH_REUSEPORT_BPF: c_int = 68;
103
103
// pub const SO_PREFER_BUSY_POLL: c_int = 69;
104
104
// pub const SO_BUSY_POLL_BUDGET: c_int = 70;
You can’t perform that action at this time.
0 commit comments