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
  • Loading branch information
test committed Nov 13, 2024
1 parent 600e1d1 commit b7281a1
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/full_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,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 Down
3 changes: 3 additions & 0 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1485,6 +1485,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 @@ -89,9 +89,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 b7281a1

Please sign in to comment.