]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/platform-bionic.git/commitdiff
Add arc4random_addrandom binary compatibility.
authorElliott Hughes <enh@google.com>
Mon, 8 Sep 2014 17:25:33 +0000 (10:25 -0700)
committerElliott Hughes <enh@google.com>
Mon, 8 Sep 2014 17:47:45 +0000 (10:47 -0700)
This was in <stdlib.h> in older releases. It's no longer used, but we can
preserve backwards compatibility by making it a no-op.

Bug: 16205834
Change-Id: Idde7b46df4f253e39675600bcf82352879a716e7

libc/bionic/ndk_cruft.cpp

index 7879b7f32d837f16a9718712dc3e0b1bea441a92..829e8f3b631a845ae2170a9b9854eabf8acaff7b 100644 (file)
@@ -308,6 +308,11 @@ extern "C" void arc4random_stir(void) {
   // The current implementation stirs itself as needed.
 }
 
+// This was removed from BSD.
+extern "C" void arc4random_addrandom(unsigned char*, int) {
+  // The current implementation adds randomness as needed.
+}
+
 // Old versions of the NDK did not export malloc_usable_size, but did
 // export dlmalloc_usable_size. We are moving away from dlmalloc in L
 // so make this call malloc_usable_size.