From 642adfc78d510e42018036d73de6f875d488b61d Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Thu, 30 Oct 2025 15:08:02 -0500 Subject: [PATCH 1/2] ci: Re-enable ohos check builds --- ci/verify-build.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ci/verify-build.py b/ci/verify-build.py index 7e52e749440b..483dc5cfa96f 100755 --- a/ci/verify-build.py +++ b/ci/verify-build.py @@ -68,7 +68,6 @@ def __post_init__(self): FREEBSD_VERSIONS = [11, 12, 13, 14, 15] -# FIXME(ohos): CI fails with warnings TARGETS = [ # Tier 1 Target("aarch64-apple-darwin"), @@ -83,11 +82,11 @@ def __post_init__(self): # Tier 2 with host tools Target("aarch64-pc-windows-gnullvm", min_toolchain=Toolchain.STABLE), Target("aarch64-unknown-linux-musl"), - # Target("aarch64-unknown-linux-ohos"), + Target("aarch64-unknown-linux-ohos", min_toolchain=Toolchain.STABLE), Target("arm-unknown-linux-gnueabi"), Target("arm-unknown-linux-gnueabihf"), Target("armv7-unknown-linux-gnueabihf"), - # Target("armv7-unknown-linux-ohos"), + Target("armv7-unknown-linux-ohos", min_toolchain=Toolchain.STABLE), Target("i686-pc-windows-gnu"), Target("loongarch64-unknown-linux-gnu", min_toolchain=Toolchain.STABLE), Target("loongarch64-unknown-linux-musl", min_toolchain=Toolchain.STABLE), @@ -104,7 +103,7 @@ def __post_init__(self): Target("x86_64-unknown-freebsd"), Target("x86_64-unknown-illumos"), Target("x86_64-unknown-linux-musl"), - # Target("x86_64-unknown-linux-ohos"), + Target("x86_64-unknown-linux-ohos", min_toolchain=Toolchain.STABLE), Target("x86_64-unknown-netbsd"), # # Tier 2 without host tools From f76eb39a8210209f1077acba13289ffe7078231c Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Thu, 30 Oct 2025 15:08:02 -0500 Subject: [PATCH 2/2] ohos: Don't emit duplicate lfs64 definitions The musl module is enabled on ohos, so these are duplicates. --- src/unix/linux_like/linux/mod.rs | 4 ++-- src/unix/linux_like/mod.rs | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index 9663f91b66e6..8f3c1958432d 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -1187,7 +1187,7 @@ s! { size: [u8; crate::__SIZEOF_PTHREAD_BARRIERATTR_T], } - #[cfg(not(target_env = "musl"))] + #[cfg(not(any(target_env = "musl", target_env = "ohos")))] #[repr(align(8))] pub struct fanotify_event_metadata { pub event_len: __u32, @@ -6723,7 +6723,7 @@ extern "C" { // // * musl has 64-bit versions only so aliases the LFS64 symbols to the standard ones cfg_if! { - if #[cfg(not(target_env = "musl"))] { + if #[cfg(not(any(target_env = "musl", target_env = "ohos")))] { extern "C" { pub fn fallocate64(fd: c_int, mode: c_int, offset: off64_t, len: off64_t) -> c_int; pub fn fgetpos64(stream: *mut crate::FILE, ptr: *mut fpos64_t) -> c_int; diff --git a/src/unix/linux_like/mod.rs b/src/unix/linux_like/mod.rs index 877eaa753ade..793609052d48 100644 --- a/src/unix/linux_like/mod.rs +++ b/src/unix/linux_like/mod.rs @@ -2100,7 +2100,11 @@ extern "C" { // * musl and Emscripten has 64-bit versions only so aliases the LFS64 symbols to the standard ones // * ulibc doesn't have preadv64/pwritev64 cfg_if! { - if #[cfg(not(any(target_env = "musl", target_os = "emscripten")))] { + if #[cfg(not(any( + target_env = "musl", + target_env = "ohos", + target_os = "emscripten", + )))] { extern "C" { pub fn fstatfs64(fd: c_int, buf: *mut statfs64) -> c_int; pub fn statvfs64(path: *const c_char, buf: *mut statvfs64) -> c_int; @@ -2160,7 +2164,8 @@ cfg_if! { if #[cfg(not(any( target_env = "uclibc", target_env = "musl", - target_os = "emscripten" + target_env = "ohos", + target_os = "emscripten", )))] { extern "C" { pub fn preadv64(