summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-02-13 07:42:06 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-02-13 07:42:06 +0000
commit81659b1df185f8e269319fe903042b0a6bd11372 (patch)
tree2ff5fba9ab0ed622c8b0ae8bbd3d2259c53f5ffb /libc
parentcaed8420ef5be27f4b6e2b07a39e21642e6d1ceb (diff)
Don't compile arc4random if option not set
Diffstat (limited to 'libc')
-rw-r--r--libc/stdlib/Makefile.in5
-rw-r--r--libc/stdlib/arc4random.c4
2 files changed, 4 insertions, 5 deletions
diff --git a/libc/stdlib/Makefile.in b/libc/stdlib/Makefile.in
index 26bc78201..d8983389d 100644
--- a/libc/stdlib/Makefile.in
+++ b/libc/stdlib/Makefile.in
@@ -62,7 +62,10 @@ CSRC:= \
getpt.c ptsname.c grantpt.c unlockpt.c gcvt.c drand48-iter.c jrand48.c \
jrand48_r.c lrand48.c lrand48_r.c mrand48.c mrand48_r.c nrand48.c \
nrand48_r.c rand_r.c srand48.c srand48_r.c seed48.c seed48_r.c \
- valloc.c posix_memalign.c a64l.c l64a.c arc4random.c
+ valloc.c posix_memalign.c a64l.c l64a.c
+ifeq ($(UCLIBC_HAS_ARC4RANDOM),y)
+CSRC+=arc4random.c
+endif
ifeq ($(UCLIBC_HAS_LFS),y)
CSRC+=mkstemp64.c
endif
diff --git a/libc/stdlib/arc4random.c b/libc/stdlib/arc4random.c
index 1c785a385..836b79f6c 100644
--- a/libc/stdlib/arc4random.c
+++ b/libc/stdlib/arc4random.c
@@ -27,8 +27,6 @@
*/
#include <features.h>
-#ifdef __UCLIBC_HAS_ARC4RANDOM__
-
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
@@ -210,5 +208,3 @@ int main(void) {
return 0;
}
#endif
-
-#endif /* __UCLIBC_HAS_ARC4RANDOM__ */