History

fix building on android/termux

Sigrid Solveig Haflínudóttir committed 1 year agofront0.6

Commit bcd4cb61 parent 04522872 files · +8 −3Browse files

Unified · Split

2 files
  1. Makefile +2 −2
  2. libc/genrandom.c +6 −1
Makefile+2−2
@@ -4,8 +4,8 @@ PREFIX?=/usr/local · 3 unmodified lines
44 BIN=${DESTDIR}${PREFIX}/bin
55 MAN=${DESTDIR}${PREFIX}/share/man/man1
66 CFLAGS?=-g -O2
7−CFLAGS+=-Iinclude -Wall -Wno-missing-braces -Wno-parentheses -Wno-incompatible-pointer-types
8−LDFLAGS?=
7+CFLAGS+=-D_DEFAULT_SOURCE -Iinclude -Wall -Wno-missing-braces -Wno-parentheses -Wno-incompatible-pointer-types
8+LDFLAGS?=-lm
99
1010 OBJS=\
1111 libc/dofmt.o\
libc/genrandom.c+6−1
@@ -8,5 +8,10 @@ · 7 unmodified lines
88 void
99 genrandom(uchar *buf, int nbytes)
1010 {
11− getentropy(buf, nbytes);
11+#ifdef __ANDROID__
12+ arc4random_buf
13+#else
14+ getentropy
15+#endif
16+ (buf, nbytes);
1217 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t