~mdw
/
termux-packages
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8340bbe
)
ndk-patches: Use @TERMUX_PREFIX@
author
Fredrik Fornwall
<fredrik@fornwall.net>
Fri, 7 Jul 2017 01:29:49 +0000
(
03:29
+0200)
committer
Fredrik Fornwall
<fredrik@fornwall.net>
Fri, 7 Jul 2017 01:29:49 +0000
(
03:29
+0200)
ndk-patches/stdio.h.patch
patch
|
blob
|
blame
|
history
diff --git
a/ndk-patches/stdio.h.patch
b/ndk-patches/stdio.h.patch
index
d9af689
..
ee15fa1
100644
(file)
--- a/
ndk-patches/stdio.h.patch
+++ b/
ndk-patches/stdio.h.patch
@@
-65,7
+65,7
@@
diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/stdio.h ./usr/incl
+ int i;
+ for (i = 0; i < 100; i++) {
+ unsigned int r = arc4random();
+ int i;
+ for (i = 0; i < 100; i++) {
+ unsigned int r = arc4random();
-+ if (asprintf(&path, "
/data/data/com.termux/files/usr
/tmp/tmpfile.%d-%u", p, r) == -1) return NULL;
++ if (asprintf(&path, "
@TERMUX_PREFIX@
/tmp/tmpfile.%d-%u", p, r) == -1) return NULL;
+ int fd = open(path, O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE, 0600);
+ free(path);
+ if (fd >= 0) {
+ int fd = open(path, O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE, 0600);
+ free(path);
+ if (fd >= 0) {