Skip to content

Commit d11936f

Browse files
KeeyouThomasdezeeuw
authored andcommitted
Fix compilation with target_env=ohos
OpenHarmony(alias ohos) is tie 3 supported target for rust. see rust-lang/compiler-team#568. In implementation it sits close to musl instead of bionic and napi instead jni when comparing with android. Below is copied from ohos sdk: ``` > ag iov_max openharmony/9/native/sysroot/usr/include openharmony/9/native/sysroot/usr/include/limits.h 50:#define IOV_MAX 1024 162:#define _XOPEN_IOV_MAX 16 openharmony/9/native/sysroot/usr/include/unistd.h 320:#define _SC_IOV_MAX 60 ```
1 parent 76cbffb commit d11936f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/sys/unix.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ type IovLen = usize;
325325
target_os = "linux",
326326
any(
327327
target_env = "musl",
328+
target_env = "ohos",
328329
all(target_env = "uclibc", target_pointer_width = "32")
329330
)
330331
),

0 commit comments

Comments
 (0)