aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorC. McEnroe <june@causal.agency>2020-01-28 03:02:19 -0500
committerC. McEnroe <june@causal.agency>2020-01-28 03:02:19 -0500
commit205384d6a5ff3bab03e11e9e1324c18d16bb8192 (patch)
tree277ce58c22e9209698de195352f4dc8b293ab28a
parentAdd arc4random_buf compatibility (diff)
downloadnotemap-205384d6a5ff3bab03e11e9e1324c18d16bb8192.tar.gz
notemap-205384d6a5ff3bab03e11e9e1324c18d16bb8192.zip
Call fopencookie with a+1.0
This fixes strange behaviour when interleaving reads and writes.
-rw-r--r--compat.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/compat.h b/compat.h
index a3788dc..6398510 100644
--- a/compat.h
+++ b/compat.h
@@ -87,7 +87,7 @@ funopen(
if (!funopen) return NULL;
assert(!seekfn);
*funopen = (struct _funopen) { (void *)cookie, readfn, writefn, closefn };
- return fopencookie(funopen, "r+", _cookie_fns);
+ return fopencookie(funopen, "a+", _cookie_fns);
}
#endif /* __linux__ */