rust-lang / socket2

Advanced configuration options for sockets.
https://docs.rs/socket2
Apache License 2.0
683 stars 227 forks source link

Fix compilation error with target_env=ohos #491

Closed Chilledheart closed 9 months ago

Chilledheart commented 9 months ago

OpenHarmony(alias ohos) is tie 3 supported target for rust. see https://github.com/rust-lang/compiler-team/issues/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
Thomasdezeeuw commented 9 months ago

Thanks @Chilledheart