Open Z-snails opened 1 year ago
I decided to take a stab at this, so I took https://github.com/devnexen/libc/commit/942d622b8a18d5018c10af51dbd6cbafb3c63035, fixed it up and pushed it to my Samsung S10 phone running termux, and tried to run cargo test
in the libc-test
directory, using rust 1.73:
I got these logs that indicate that set/get/endpwent
aren't defined, but I'm also on android 12.
The source code seems to indicate that getpwent
, setpwent
, and endpwent
are all "introduced in the future", which I take to mean someday they'll be part of android? (Maybe z-snails phone is newer than mine).
On the flip side, at least the group side is defined, so these can be defined for android.
Edit: I was looking at a really old version of the source tree, the current version indicates these were implemented in API 26: https://android.googlesource.com/platform/bionic/+/b28d496/libc/include/pwd.h#120. I guess its time to upgrade the emulator to make sure CI passes.
@Takashiidobe I think our Android CI may be improved at this point, if you want to try reapplying your PR
The
get
/setpwent
functions are not available on the aarch64-linux-android target, however libc on this platform (at least on my phone) does have this symbol in the libc library. I'm happy to add this api, but it would be my first PR, so I wanted to first check there wasn't some reason not to include it.Also I don't know if I'd need to add some more functions/types? A dependency of a package I'm using doesn't compile because of this issue, I don't actually know the api at all, so any help would be appreciated.
This api is available in this package for x86_64 linux, so would it just be a case of porting that code over?