Commit e79d06d5 authored by Max Kellermann's avatar Max Kellermann

fs/io/FileOutputStream: don't use O_TMPFILE on Android

Fixes writing to Context.getCacheDir().
parent c60cf944
...@@ -46,7 +46,12 @@ ...@@ -46,7 +46,12 @@
#include <windows.h> #include <windows.h>
#endif #endif
#ifdef __linux__ #if defined(__linux__) && !defined(ANDROID)
/* we don't use O_TMPFILE on Android because Android's braindead
SELinux policy disallows hardlinks
(https://android.googlesource.com/platform/external/sepolicy/+/85ce2c7),
even hardlinks from /proc/self/fd/*, which however is required to
use O_TMPFILE */
#define HAVE_O_TMPFILE #define HAVE_O_TMPFILE
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment