aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorWenhao Wang <wenhaowang@google.com>2020-02-21 12:49:34 -0800
committerWenhao Wang <wenhaowang@google.com>2020-02-21 12:57:43 -0800
commit24c6df86c11e6f20c730cbe934373ccba7424870 (patch)
tree5a597ad423800b08f64b6b5590759bb9147e0311 /lib
parentaf4bc41c7362fd0b39b883eb524cc8e743afa305 (diff)
downloadcommon-24c6df86c11e6f20c730cbe934373ccba7424870.tar.gz
Rename function name
CSPRNG has function named rand_add_entropy, which causes a name collision. We rename it as libc_trusty_rand_add_entropy, which will be called by CSPRNG's rand_add_entropy. Bug: 149958771 Change-Id: I09b7213b52376805d21651535ad2d5b5f1564cf7
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/include/rand.h2
-rw-r--r--lib/libc/rand.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/include/rand.h b/lib/libc/include/rand.h
index 8a054d39..8155493d 100644
--- a/lib/libc/include/rand.h
+++ b/lib/libc/include/rand.h
@@ -32,7 +32,7 @@ int rand(void);
void srand(unsigned int seed);
/* non standard extension to add some entropy to the seed */
-void rand_add_entropy(const void *buf, size_t len);
+void libc_trusty_rand_add_entropy(const void *buf, size_t len);
__END_CDECLS;
diff --git a/lib/libc/rand.c b/lib/libc/rand.c
index a7c0e00d..5bc5d36c 100644
--- a/lib/libc/rand.c
+++ b/lib/libc/rand.c
@@ -30,7 +30,7 @@ void srand(unsigned int seed)
randseed = seed;
}
-void rand_add_entropy(const void *buf, size_t len)
+void libc_trusty_rand_add_entropy(const void *buf, size_t len)
{
if (len == 0)
return;