diff options
author | Elliott Hughes <enh@google.com> | 2014-07-18 15:57:41 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-07-21 14:38:16 -0700 |
commit | 2b67d7dee09852789d9ac7d8972ed6cdb2c18430 (patch) | |
tree | a9a5165ceb108943a62dd251c2aeeccd2f96ae23 /libc/upstream-openbsd/android/include/openbsd-compat.h | |
parent | 1fb90a8aa0086f7e4f7960a5b916b8605a9a3c96 (diff) | |
download | android_bionic-2b67d7dee09852789d9ac7d8972ed6cdb2c18430.tar.gz android_bionic-2b67d7dee09852789d9ac7d8972ed6cdb2c18430.tar.bz2 android_bionic-2b67d7dee09852789d9ac7d8972ed6cdb2c18430.zip |
Use upstream OpenBSD's arc4random.
The getentropy_linux.c is lightly modified to build on Android, but we're now
completely in sync with upstream OpenBSD's arc4random implementation.
Change-Id: If32229fc28aba908035fb38703190d41ddcabc95
Diffstat (limited to 'libc/upstream-openbsd/android/include/openbsd-compat.h')
-rw-r--r-- | libc/upstream-openbsd/android/include/openbsd-compat.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libc/upstream-openbsd/android/include/openbsd-compat.h b/libc/upstream-openbsd/android/include/openbsd-compat.h index 5827a82dd..34ad2c5c8 100644 --- a/libc/upstream-openbsd/android/include/openbsd-compat.h +++ b/libc/upstream-openbsd/android/include/openbsd-compat.h @@ -18,6 +18,7 @@ #define _BIONIC_OPENBSD_COMPAT_H_included #include <sys/cdefs.h> +#include <stddef.h> // For size_t. #define __USE_BSD @@ -36,6 +37,11 @@ /* OpenBSD has this, but we can't really implement it correctly on Linux. */ #define issetugid() 0 +#define explicit_bzero(p, s) memset(p, 0, s) + +/* We have OpenBSD's getentropy_linux.c, but we don't mention getentropy in any header. */ +__LIBC_HIDDEN__ extern int getentropy(void*, size_t); + /* LP32 NDK ctype.h contained references to these. */ __LIBC64_HIDDEN__ extern const short* _tolower_tab_; __LIBC64_HIDDEN__ extern const short* _toupper_tab_; |