Closed cyxcw1 closed 6 years ago
luckily for you, they deleted that code to fix https://github.com/libtom/libtommath/issues/103 so you probably just want to upgrade. (you might also want to send them a patch to add BIONIC to the list of libcs that have arc4random.)
looking at that patch, i think the problem with their old code was that they were missing the necessary #include <stdlib.h>
. if you can't upgrade to the current code for some reason, you should find that adding the missing #include
gets you the workaround as an inline from our headers.
@enh Thank you very much. But I got another question about minSdkVersion 19: https://github.com/android-ndk/ndk/issues/770
Description
When I use minSdkVersion 19 compile my project, and in the link step, I got this error:
libtomcrypt/android/armeabi-v7a/libtommath.a(bn_mp_rand.c.o):../../tomcrymath/tommath/bn_mp_rand.c:function mp_rand: error: undefined reference to 'rand'
But I change my minSdkVersion to 21, the error disappear. My APP must support API 19, Do we have some workaround to solve this problem?Environment Details