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

Fixes writing to Context.getCacheDir().
This commit is contained in:
Max Kellermann 2018-10-31 17:12:21 +01:00
parent c60cf944f5
commit e79d06d595

View File

@ -46,7 +46,12 @@
#include <windows.h>
#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
#endif