Skip to content

android: Add getpwent/setpwent/endpwent#5160

Open
sylfn wants to merge 1 commit into
rust-lang:mainfrom
sylfn:android-getpwent
Open

android: Add getpwent/setpwent/endpwent#5160
sylfn wants to merge 1 commit into
rust-lang:mainfrom
sylfn:android-getpwent

Conversation

@sylfn

@sylfn sylfn commented Jun 10, 2026

Copy link
Copy Markdown

Closes #3014
Supersedes #3015

Description

This pull request adds support for getpwent, setpwent and endpwent for Android targets. I have no idea how to gate them behind API >= 26, and previous PR didn't do this either so I assume it's fine

Sources

https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/include/pwd.h;l=89;drc=02ce401d1e2b31586c94c8b6999364bbbce27388

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

Tried testing locally on x86_64-unknown-linux-gnu (NixOS) host with:

  • cross (git), cross test --target aarch64-linux-android (NDK r25b, API 28, Android 9.0.0_r1, from their a bit dated Dockerfile): failed to compile, errors on IFF_NO_CARRIER, TUN_F_*, PR_* and several others.
  • cargo zigbuild --tests --target aarch64-linux-android (zig 0.16.0): failed due to missing include sys/param.h

@rustbot label +stable-nominated

@rustbot

rustbot commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in an Android module

cc @maurer

@rustbot rustbot added S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Jun 10, 2026
@rustbot

This comment has been minimized.

@sylfn sylfn force-pushed the android-getpwent branch 2 times, most recently from b0e92ee to 3c66425 Compare June 14, 2026 03:56
@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@JohnTitor

Copy link
Copy Markdown
Member

You need to skip the test on

fn test_android(target: &str) {
to make CI pass.
@rustbot author

@rustbot

rustbot commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@sylfn sylfn force-pushed the android-getpwent branch from 2a8940d to cb88ae7 Compare June 15, 2026 11:41
@rustbot

rustbot commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@sylfn

sylfn commented Jun 15, 2026

Copy link
Copy Markdown
Author

@rustbot ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get/setpwent is missing on aarch64 android

3 participants