[git commit prelink] arc4random.c, stdlib.h: get rid of hidden arc4random_stir

Peter S. Mazinger ps.m at gmx.net
Wed Mar 30 11:53:36 UTC 2011


commit: http://git.uclibc.org/uClibc/commit/?id=dad0315108b60d47af25aa46a7f11084c15d821f
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/prelink

The function is used only in one file, make an internal static version for this

Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
---
 include/stdlib.h         |    1 -
 libc/stdlib/arc4random.c |   10 +++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/include/stdlib.h b/include/stdlib.h
index c533bd5..1865727 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -906,7 +906,6 @@ extern int getloadavg (double __loadavg[], int __nelem)
 #include <stdint.h>
 extern uint32_t arc4random(void);
 extern void arc4random_stir(void);
-libc_hidden_proto(arc4random_stir)
 extern void arc4random_addrandom(unsigned char *, int);
 #endif
 
diff --git a/libc/stdlib/arc4random.c b/libc/stdlib/arc4random.c
index 592c51e..c7aed66 100644
--- a/libc/stdlib/arc4random.c
+++ b/libc/stdlib/arc4random.c
@@ -156,8 +156,8 @@ arc4_getword(struct arc4_stream *as)
 	return val;
 }
 
-void
-arc4random_stir(void)
+static void
+__arc4random_stir(void)
 {
 	if (!rs_initialized) {
 		arc4_init(&rs);
@@ -165,13 +165,13 @@ arc4random_stir(void)
 	}
 	arc4_stir(&rs);
 }
-libc_hidden_def(arc4random_stir)
+strong_alias(__arc4random_stir,arc4random_stir)
 
 void
 arc4random_addrandom(u_char *dat, int datlen)
 {
 	if (!rs_initialized)
-		arc4random_stir();
+		__arc4random_stir();
 	arc4_addrandom(&rs, dat, datlen);
 }
 
@@ -179,7 +179,7 @@ uint32_t
 arc4random(void)
 {
 	if (!rs_initialized)
-		arc4random_stir();
+		__arc4random_stir();
 	return arc4_getword(&rs);
 }
 
-- 
1.7.3.4



More information about the uClibc-cvs mailing list