Skip to content

Commit 741264c

Browse files
psumberatgross35
authored andcommitted
Solaris: Add CI, fix: confstr, uc_lwpid is missing from Solaris 11.4 CBE release
1 parent 3a0b044 commit 741264c

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed

.github/workflows/full_ci.yml

+28
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,33 @@ jobs:
187187
- name: Execute run-docker.sh
188188
run: sh ./ci/run-docker.sh ${{ matrix.target }}
189189

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

src/unix/mod.rs

+3
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

+1-3
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)