linux – function getauxval is undefined in android studio-ThrowExceptions

Exception or error:

so im trying to use the getauxval function in a native library i write in android studio,
but unfortunately i can’t compile the code since the function seems to don’t exist.

when i include the header auxv.h where the function defined i can find the function there with the condition macros:

#if __ANDROID_API__ >= 18

unsigned long int getauxval(unsigned long int __type) __INTRODUCED_IN(18);

#endif /* __ANDROID_API__ >= 18 */

my android api variable is bigger than 18, and anyway i tried to edit and remove this condition macro and it still didn’t worked… does anyone know how to fix it?
thank you!

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *