Skip to content

Commit

Permalink
Solaris: Add CI, fix: confstr, uc_lwpid is missing from Solaris 11.4 …
Browse files Browse the repository at this point in the history
…CBE release

(backport <rust-lang#4035>)
(cherry picked from commit 741264c)
  • Loading branch information
psumbera authored and tgross35 committed Nov 16, 2024
1 parent 3a1582f commit 971645b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/full_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,33 @@ jobs:
- name: Execute run-docker.sh
run: sh ./ci/run-docker.sh ${{ matrix.target }}

solaris:
name: Solaris
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
target:
- x86_64-pc-solaris
steps:
- uses: actions/checkout@v4
- name: test on Solaris
uses: vmactions/solaris-vm@v1
with:
release: "11.4-gcc"
usesh: true
mem: 4096
copyback: false
prepare: |
source <(curl -s https://raw.githubusercontent.com/psumbera/solaris-rust/refs/heads/main/sh.rust-web-install)
echo "~~~~ rustc --version ~~~~"
rustc --version
echo "~~~~ Solaris-version ~~~~"
uname -a
run: |
export PATH=$HOME/.rust_solaris/bin:$PATH
bash ./ci/run.sh ${{ matrix.target }}
check_cfg:
name: "Check #[cfg]s"
runs-on: ubuntu-22.04
Expand All @@ -214,6 +241,7 @@ jobs:
- docker_linux_tier2
- macos
- windows
- solaris
- style_check
- build_channels_linux
- build_channels_macos
Expand Down
3 changes: 3 additions & 0 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1492,6 +1492,9 @@ cfg_if! {
all(target_os = "macos", target_arch = "x86"),
link_name = "confstr$UNIX2003"
)]
#[cfg_attr(target_os = "solaris",
link_name = "__confstr_xpg7"
)]
pub fn confstr(name: ::c_int, buf: *mut ::c_char, len: ::size_t) -> ::size_t;
}
}
Expand Down
4 changes: 1 addition & 3 deletions src/unix/solarish/x86_64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ s_no_extra_traits! {
#[cfg(target_os = "solaris")]
pub uc_xrs: solaris::xrs_t,
#[cfg(target_os = "solaris")]
pub uc_lwpid: ::c_uint,
#[cfg(target_os = "solaris")]
pub uc_filler: [::c_long; 2],
pub uc_filler: [::c_long; 3],
}
}

Expand Down

0 comments on commit 971645b

Please sign in to comment.