Skip to content

Commit 971645b

Browse files
psumberatgross35
authored andcommitted
Solaris: Add CI, fix: confstr, uc_lwpid is missing from Solaris 11.4 CBE release
(backport <rust-lang#4035>) (cherry picked from commit 741264c)
1 parent 3a1582f commit 971645b

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
@@ -194,6 +194,33 @@ jobs:
194194
- name: Execute run-docker.sh
195195
run: sh ./ci/run-docker.sh ${{ matrix.target }}
196196

197+
solaris:
198+
name: Solaris
199+
runs-on: ubuntu-latest
200+
strategy:
201+
fail-fast: true
202+
matrix:
203+
target:
204+
- x86_64-pc-solaris
205+
steps:
206+
- uses: actions/checkout@v4
207+
- name: test on Solaris
208+
uses: vmactions/solaris-vm@v1
209+
with:
210+
release: "11.4-gcc"
211+
usesh: true
212+
mem: 4096
213+
copyback: false
214+
prepare: |
215+
source <(curl -s https://raw.githubusercontent.com/psumbera/solaris-rust/refs/heads/main/sh.rust-web-install)
216+
echo "~~~~ rustc --version ~~~~"
217+
rustc --version
218+
echo "~~~~ Solaris-version ~~~~"
219+
uname -a
220+
run: |
221+
export PATH=$HOME/.rust_solaris/bin:$PATH
222+
bash ./ci/run.sh ${{ matrix.target }}
223+
197224
check_cfg:
198225
name: "Check #[cfg]s"
199226
runs-on: ubuntu-22.04
@@ -214,6 +241,7 @@ jobs:
214241
- docker_linux_tier2
215242
- macos
216243
- windows
244+
- solaris
217245
- style_check
218246
- build_channels_linux
219247
- build_channels_macos

src/unix/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1492,6 +1492,9 @@ cfg_if! {
14921492
all(target_os = "macos", target_arch = "x86"),
14931493
link_name = "confstr$UNIX2003"
14941494
)]
1495+
#[cfg_attr(target_os = "solaris",
1496+
link_name = "__confstr_xpg7"
1497+
)]
14951498
pub fn confstr(name: ::c_int, buf: *mut ::c_char, len: ::size_t) -> ::size_t;
14961499
}
14971500
}

src/unix/solarish/x86_64.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@ s_no_extra_traits! {
9090
#[cfg(target_os = "solaris")]
9191
pub uc_xrs: solaris::xrs_t,
9292
#[cfg(target_os = "solaris")]
93-
pub uc_lwpid: ::c_uint,
94-
#[cfg(target_os = "solaris")]
95-
pub uc_filler: [::c_long; 2],
93+
pub uc_filler: [::c_long; 3],
9694
}
9795
}
9896

0 commit comments

Comments
 (0)