Skip to content

Commit b8093a0

Browse files
authored
Merge pull request #4035 from psumbera/solaris-ci
Solaris: Add CI, fix: confstr, uc_lwpid is missing from Solaris 11.4 …
2 parents fad318b + 741264c commit b8093a0

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed

.github/workflows/full_ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,33 @@ jobs:
188188
- name: Execute run-docker.sh
189189
run: sh ./ci/run-docker.sh ${{ matrix.target }}
190190

191+
solaris:
192+
name: Solaris
193+
runs-on: ubuntu-latest
194+
strategy:
195+
fail-fast: true
196+
matrix:
197+
target:
198+
- x86_64-pc-solaris
199+
steps:
200+
- uses: actions/checkout@v4
201+
- name: test on Solaris
202+
uses: vmactions/solaris-vm@v1
203+
with:
204+
release: "11.4-gcc"
205+
usesh: true
206+
mem: 4096
207+
copyback: false
208+
prepare: |
209+
source <(curl -s https://raw.githubusercontent.com/psumbera/solaris-rust/refs/heads/main/sh.rust-web-install)
210+
echo "~~~~ rustc --version ~~~~"
211+
rustc --version
212+
echo "~~~~ Solaris-version ~~~~"
213+
uname -a
214+
run: |
215+
export PATH=$HOME/.rust_solaris/bin:$PATH
216+
bash ./ci/run.sh ${{ matrix.target }}
217+
191218
check_cfg:
192219
name: "Check #[cfg]s"
193220
runs-on: ubuntu-22.04
@@ -208,6 +235,7 @@ jobs:
208235
- docker_linux_tier2
209236
- macos
210237
- windows
238+
- solaris
211239
- style_check
212240
- build_channels_linux
213241
- build_channels_macos

src/unix/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,6 +1485,9 @@ cfg_if! {
14851485
all(target_os = "macos", target_arch = "x86"),
14861486
link_name = "confstr$UNIX2003"
14871487
)]
1488+
#[cfg_attr(target_os = "solaris",
1489+
link_name = "__confstr_xpg7"
1490+
)]
14881491
pub fn confstr(name: ::c_int, buf: *mut ::c_char, len: ::size_t) -> ::size_t;
14891492
}
14901493
}

src/unix/solarish/x86_64.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ s_no_extra_traits! {
8989
#[cfg(target_os = "solaris")]
9090
pub uc_xrs: solaris::xrs_t,
9191
#[cfg(target_os = "solaris")]
92-
pub uc_lwpid: ::c_uint,
93-
#[cfg(target_os = "solaris")]
94-
pub uc_filler: [::c_long; 2],
92+
pub uc_filler: [::c_long; 3],
9593
}
9694
}
9795

0 commit comments

Comments
 (0)