Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix building on Android by avoiding getpwent() #3441
floam left a comment
I don't really like the "return 0" thing going on here - and there still should be usernames on Android, interesting or not. I'd like if you checked getpwent linkability in autoconf and provided a workaround of some sort, if practical.
Thanks a lot for the feedback! I've updated from
As for a fallback, a Linux user on Android isn't really a user - each installed app gets an UID assigned. Listing all UID:s is not possible without root access, and doing a ~USER type expansion does not make sense since every app is sandboxed and can't access eachother. So I think a fallback is not really possible.
As for an autoconf check if
I found this stuff interesting:
Maybe we could do similar. There are some mappings defined in a header file as well.