File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change
1
+ Fix cmsg_len() return type on OpenHarmony
Original file line number Diff line number Diff line change @@ -1169,13 +1169,13 @@ impl<'a> ControlMessage<'a> {
1169
1169
/// The value of CMSG_LEN on this message.
1170
1170
/// Safe because CMSG_LEN is always safe
1171
1171
#[ cfg( any( target_os = "android" ,
1172
- all( target_os = "linux" , not( target_env = "musl" ) ) ) ) ]
1172
+ all( target_os = "linux" , not( any ( target_env = "musl" , target_env = "ohos" ) ) ) ) ) ]
1173
1173
fn cmsg_len( & self ) -> usize {
1174
1174
unsafe { CMSG_LEN ( self . len( ) as libc:: c_uint) as usize }
1175
1175
}
1176
1176
1177
1177
#[ cfg( not( any( target_os = "android" ,
1178
- all( target_os = "linux" , not( target_env = "musl" ) ) ) ) ) ]
1178
+ all( target_os = "linux" , not( any ( target_env = "musl" , target_env = "ohos" ) ) ) ) ) ) ]
1179
1179
fn cmsg_len( & self ) -> libc:: c_uint {
1180
1180
unsafe { CMSG_LEN ( self . len( ) as libc:: c_uint) }
1181
1181
}
You can’t perform that action at this time.
0 commit comments