Skip to content

Conversation

@SamB
Copy link

@SamB SamB commented Nov 25, 2025

This helps on Termux running on versions of Android that have getentropy in libc, but targetting an API level before getentropy was added (as Termux clang does by default).

This helps on Termux running on versions of Android that have
getentropy in libc, but targetting an API level before getentropy was
added (as Termux clang does by default).
@SamB
Copy link
Author

SamB commented Nov 25, 2025

Oh, this needs configure regenerated, does CI do anything about that or does that need to be done in the PR branch?

I suspect doing this under Termux may be suboptimal as it does not follow the FHS, but I could do it later on my computer.

@SamB SamB marked this pull request as draft November 25, 2025 17:46
@SamB
Copy link
Author

SamB commented Nov 25, 2025

Oh, looking at HACKING.adoc, it seems I am meant to update configure in my changes, converted to draft until I get a chance to hop on my computer and do that.

@shindere
Copy link
Contributor

shindere commented Nov 25, 2025 via email

@shindere
Copy link
Contributor

shindere commented Nov 25, 2025 via email

@MisterDA
Copy link
Contributor

I think you need both.
The definition of the function is guarded by a macro whose value is the current API level (aka minSdkVersion) The macro is set by Clang with its --target flag, with a possible value being aarch64-linux-android27.
I think I remember that the configure test was linking with the most recent libc on Android, so the linking test was succeeding, but the declaration was hidden so the compilation of the C file was failing.

@dra27
Copy link
Member

dra27 commented Nov 26, 2025

There’s a number of things which are confusing me here. getentropy was only standardised in Issue 8, so the test for the declaration is likely to remain tricky for a while.

If configure wasn’t originally being regenerated, can I just double-check how this has been being tested?

For the original Android part of the problem, what changes later in the build system to allow this to work? i.e. I’m not yet clear what the connection is between what is failing in the check here (which sounds like a missing CFLAGS entry?) but then why it’s the build doesn’t subsequently have the same problem?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants