Skip to content

[0.2] Backports #4315

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 10 commits into from
Mar 10, 2025
Merged

[0.2] Backports #4315

merged 10 commits into from
Mar 10, 2025

Conversation

@rustbot
Copy link
Collaborator

rustbot commented Mar 10, 2025

@tgross35: no appropriate reviewer found, use r? to override

@rustbot
Copy link
Collaborator

rustbot commented Mar 10, 2025

Some changes occurred in solarish module

cc @jclulow, @pfmooney

Some changes occurred in OpenBSD module

cc @semarie

Some changes occurred in OpenBSD module

cc @semarie

Some changes occurred in the Android module

cc @maurer

@tgross35 tgross35 enabled auto-merge March 10, 2025 09:54
jrmarino and others added 10 commits March 10, 2025 09:58
While here:
  - Relocate mkostemp and mkostemps functions for same reason
  - Update semver tests for DF spawn and mkostemp(s)

(backport <rust-lang#4294>)
[ update constants to c_int to match libc-0.2 - Trevor ]
(cherry picked from commit a294be6)
Base libc crate symbols without named syscall stubbing in this crate.
Basic `libc-test` support is included, but the target is currently
untested

(backport <rust-lang#4244>)
(cherry picked from commit 1b8acf5)
Remove the comment of these socket options.
Reference: https://elixir.bootlin.com/linux/latest/source/include/uapi/asm-generic/socket.h

Note, musl hardcodes 'SO_*' constants instead of inheriting them from the OS.

Signed-off-by: Pedro Tammela <pctammela@gmail.com>

(backport <rust-lang#3917>)
(cherry picked from commit b3884fb)
Hopefully this will help some of the recent CI issues.

(backport <rust-lang#4306>)
(cherry picked from commit 8efcf7b)
(backport <rust-lang#4301>)
(cherry picked from commit a4fd45e)
Co-authored-by: Ookiineko <chiisaineko@protonmail.com>

(backport <rust-lang#4279>)
(cherry picked from commit f5569b1)
With the latest changes, libstd no longer builds:

```
   Compiling libc v0.2.170 (/opt/Xous/libc)
error[E0412]: cannot find type `c_int` in this scope
  --> /opt/Xous/libc/src/xous.rs:17:20
   |
17 | pub const INT_MIN: c_int = -2147483648;
   |                    ^^^^^ not found in this scope
   |
help: consider importing one of these type aliases
   |
5  + use crate::c_int;
   |
5  + use rustc_std_workspace_core::ffi::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /opt/Xous/libc/src/xous.rs:18:20
   |
18 | pub const INT_MAX: c_int = 2147483647;
   |                    ^^^^^ not found in this scope
   |
help: consider importing one of these type aliases
   |
5  + use crate::c_int;
   |
5  + use rustc_std_workspace_core::ffi::c_int;
   |

For more information about this error, try `rustc --explain E0412`.
error: could not compile `libc` (lib) due to 2 previous errors
```

Include the prelude to define `c_int` and fix the build on rust `main`.

Signed-off-by: Sean Cross <sean@xobs.io>

(backport <rust-lang#4304>)
(cherry picked from commit fd66a07)
(backport <rust-lang#4308>)
[ update message to mention Cygwin - Trevor ]
(cherry picked from commit cd4be97)
(backport <rust-lang#4308>)
[ update message to mention Cygwin - Trevor ]
(cherry picked from commit e5f9b4e)
* `forkpty` & `openpty`: for nix::pty
* `getgrgid_r`, `getgrouplist`, getgrnam_r`, `initgroups`: for `user` feature of `nix::unistd`

(backport <rust-lang#4309>)
[ update message to mention Cygwin - Trevor ]
(cherry picked from commit 3dd7092)
@tgross35 tgross35 added this pull request to the merge queue Mar 10, 2025
Merged via the queue into rust-lang:libc-0.2 with commit c6ad434 Mar 10, 2025
43 checks passed
@tgross35 tgross35 deleted the backport-porcini branch March 12, 2025 21:34
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants