Unified · Split
| @@ -4,8 +4,8 @@ PREFIX?=/usr/local · 3 unmodified lines | |||
| 4 | BIN=${DESTDIR}${PREFIX}/bin | 4 | BIN=${DESTDIR}${PREFIX}/bin |
| 5 | MAN=${DESTDIR}${PREFIX}/share/man/man1 | 5 | MAN=${DESTDIR}${PREFIX}/share/man/man1 |
| 6 | CFLAGS?=-g -O2 | 6 | CFLAGS?=-g -O2 |
| 7 | CFLAGS+=-Iinclude -Wall -Wno-missing-braces -Wno-parentheses -Wno-incompatible-pointer-types | 7 | CFLAGS+=-D_DEFAULT_SOURCE -Iinclude -Wall -Wno-missing-braces -Wno-parentheses -Wno-incompatible-pointer-types |
| 8 | LDFLAGS?= | 8 | LDFLAGS?=-lm |
| 9 | 9 | ||
| 10 | OBJS=\ | 10 | OBJS=\ |
| 11 | libc/dofmt.o\ | 11 | libc/dofmt.o\ |
| @@ -8,5 +8,10 @@ · 7 unmodified lines | |||
| 8 | void | 8 | void |
| 9 | genrandom(uchar *buf, int nbytes) | 9 | genrandom(uchar *buf, int nbytes) |
| 10 | { | 10 | { |
| 11 | getentropy(buf, nbytes); | 11 | #ifdef __ANDROID__ |
| 12 | arc4random_buf | ||
| 13 | #else | ||
| 14 | getentropy | ||
| 15 | #endif | ||
| 16 | (buf, nbytes); | ||
| 12 | } | 17 | } |