Skip to content

Commit b452d97

Browse files
Merge branch 'rust-lang:main' into linux_wireless
2 parents 539a194 + e077dbf commit b452d97

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2056
-315
lines changed

.cirrus.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
task:
2-
name: nightly x86_64-unknown-freebsd-12
2+
name: nightly x86_64-unknown-freebsd-13
33
freebsd_instance:
4-
image_family: freebsd-12-4
4+
image_family: freebsd-13-2
55
setup_script:
66
- pkg install -y libnghttp2 curl
77
- curl https://sh.rustup.rs -sSf --output rustup.sh
8-
- sh rustup.sh --default-toolchain nightly -y --profile=minimal
8+
- sh rustup.sh -y --default-toolchain nightly --profile=minimal
99
- . $HOME/.cargo/env
1010
test_script:
1111
- . $HOME/.cargo/env
1212
- LIBC_CI=1 sh ci/run.sh x86_64-unknown-freebsd
1313
- sh ci/run.sh x86_64-unknown-freebsd
1414

1515
task:
16-
name: nightly x86_64-unknown-freebsd-13
16+
name: nightly x86_64-unknown-freebsd-14
1717
freebsd_instance:
18-
image_family: freebsd-13-2
18+
image: freebsd-14-0-release-amd64-ufs
1919
setup_script:
2020
- pkg install -y libnghttp2 curl
2121
- curl https://sh.rustup.rs -sSf --output rustup.sh
@@ -27,9 +27,9 @@ task:
2727
- sh ci/run.sh x86_64-unknown-freebsd
2828

2929
task:
30-
name: nightly x86_64-unknown-freebsd-14
30+
name: nightly x86_64-unknown-freebsd-15
3131
freebsd_instance:
32-
image: freebsd-14-0-rc1-amd64
32+
image_family: freebsd-15-0-snap
3333
setup_script:
3434
- pkg install -y libnghttp2 curl
3535
- curl https://sh.rustup.rs -sSf --output rustup.sh

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
Thanks for considering submitting a PR!
22

3+
We have the [contribution guide](https://github.com/rust-lang/libc/blob/main/CONTRIBUTING.md). Please read it if you're new here!
4+
35
Here's a checklist for things that will be checked during review or continuous integration.
46

5-
- \[ ] Edit corresponding file(s) under `libc-test/semver` when you add/remove item(s)
6-
- \[ ] Your PR doesn't contain any *unstable* values like `*LAST` or `*MAX` (see [#3131](https://github.com/rust-lang/libc/issues/3131))
7-
- \[ ] If your PR increments version number, it must not contain any other changes
8-
- \[ ] `rustc ci/style.rs && ./style src`
7+
- \[ ] Edit corresponding file(s) under `libc-test/semver` when you add/remove item(s), e.g. edit `linux.txt` if you add an item to `src/unix/linux_like/linux/mod.rs`
8+
- \[ ] Your PR doesn't contain any private or *unstable* values like `*LAST` or `*MAX` (see [#3131](https://github.com/rust-lang/libc/issues/3131))
9+
- \[ ] If your PR has a breaking change, please clarify it
10+
- \[ ] If your PR increments version number, it must NOT contain any other changes (otherwise a release could be delayed)
11+
- \[ ] Make sure `ci/style.sh` passes
912
- \[ ] `cd libc-test && cargo test`
1013
- (this might fail on your env due to environment difference between your env and CI. Ignore failures if you are not sure)
1114

.github/workflows/bors.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,10 @@ jobs:
7373
ARCH_BITS: 64
7474
ARCH: x86_64
7575
- target: x86_64-pc-windows-msvc
76-
# Disabled because broken:
77-
# https://github.com/rust-lang/libc/issues/1592
78-
#- target: i686-pc-windows-gnu
79-
# env:
80-
# ARCH_BITS: 32
81-
# ARCH: i686
76+
- target: i686-pc-windows-gnu
77+
env:
78+
ARCH_BITS: 32
79+
ARCH: i686
8280
- target: i686-pc-windows-msvc
8381
steps:
8482
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD

.github/workflows/main.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,10 @@ jobs:
5858
ARCH_BITS: 64
5959
ARCH: x86_64
6060
- target: x86_64-pc-windows-msvc
61-
# Disabled because broken:
62-
# https://github.com/rust-lang/libc/issues/1592
63-
#- target: i686-pc-windows-gnu
64-
# env:
65-
# ARCH_BITS: 32
66-
# ARCH: i686
61+
- target: i686-pc-windows-gnu
62+
env:
63+
ARCH_BITS: 32
64+
ARCH: i686
6765
- target: i686-pc-windows-msvc
6866
steps:
6967
- uses: actions/checkout@v4

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ We have two automated tests running on [GitHub Actions](https://github.com/rust-
5454
- `cd libc-test && cargo test`
5555
- Use the `skip_*()` functions in `build.rs` if you really need a workaround.
5656
2. Style checker
57-
- `rustc ci/style.rs && ./style src`
57+
- [`sh ci/style.sh`](https://github.com/rust-lang/libc/blob/main/ci/style.sh)
5858

5959
## Breaking change policy
6060

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "libc"
3-
version = "0.2.150"
3+
version = "0.2.151"
44
authors = ["The Rust Project Developers"]
55
license = "MIT OR Apache-2.0"
66
readme = "README.md"
@@ -19,6 +19,7 @@ Raw FFI bindings to platform libraries like libc.
1919
features = ["const-extern-fn", "extra_traits"]
2020
default-target = "x86_64-unknown-linux-gnu"
2121
targets = [
22+
"aarch64-apple-darwin",
2223
"aarch64-apple-ios",
2324
"aarch64-linux-android",
2425
"aarch64-pc-windows-msvc",

build.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
1313
"freebsd12",
1414
"freebsd13",
1515
"freebsd14",
16+
"freebsd15",
1617
"libc_align",
1718
"libc_cfg_target_vendor",
1819
"libc_const_extern_fn",
@@ -70,6 +71,7 @@ fn main() {
7071
Some(12) if libc_ci || rustc_dep_of_std => set_cfg("freebsd12"),
7172
Some(13) if libc_ci => set_cfg("freebsd13"),
7273
Some(14) if libc_ci => set_cfg("freebsd14"),
74+
Some(15) if libc_ci => set_cfg("freebsd15"),
7375
Some(_) | None => set_cfg("freebsd11"),
7476
}
7577

@@ -252,6 +254,7 @@ fn which_freebsd() -> Option<i32> {
252254
s if s.starts_with("12") => Some(12),
253255
s if s.starts_with("13") => Some(13),
254256
s if s.starts_with("14") => Some(14),
257+
s if s.starts_with("15") => Some(15),
255258
_ => None,
256259
}
257260
}
@@ -274,7 +277,10 @@ fn emcc_version_code() -> Option<u64> {
274277
return None;
275278
}
276279
let version = stdout.unwrap();
277-
let mut pieces = version.trim().split('.');
280+
281+
// Some Emscripten versions come with `-git` attached, so split the
282+
// version string also on the `-` char.
283+
let mut pieces = version.trim().split(|c| c == '.' || c == '-');
278284

279285
let major = pieces.next().and_then(|x| x.parse().ok()).unwrap_or(0);
280286
let minor = pieces.next().and_then(|x| x.parse().ok()).unwrap_or(0);

libc-test/Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "libc-test"
3-
version = "0.2.150"
3+
version = "0.2.151"
44
authors = ["The Rust Project Developers"]
55
license = "MIT OR Apache-2.0"
66
build = "build.rs"
@@ -12,12 +12,11 @@ A test crate for the libc crate.
1212

1313
[dependencies.libc]
1414
path = ".."
15-
version = "0.2.150"
15+
version = "0.2.151"
1616
default-features = false
1717

1818
[build-dependencies]
19-
# FIXME: 1.0.84 has a bug about macOS version detection.
20-
cc = "=1.0.83"
19+
cc = "1.0.83"
2120
# FIXME: Use fork ctest until the maintainer gets back.
2221
ctest2 = "0.4.3"
2322

0 commit comments

Comments
 (0)