diff options
author | Max Kellermann <max@musicpd.org> | 2018-10-31 17:12:21 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-10-31 17:12:21 +0100 |
commit | e79d06d595e05553fde3c5b8d229ae4ad12977dd (patch) | |
tree | 5fd1f8f68853de2100e454128df106a1a8e085b5 /src | |
parent | c60cf944f55a59dd668ebb3627476629e6e967c7 (diff) |
fs/io/FileOutputStream: don't use O_TMPFILE on Android
Fixes writing to Context.getCacheDir().
Diffstat (limited to 'src')
-rw-r--r-- | src/fs/io/FileOutputStream.hxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/fs/io/FileOutputStream.hxx b/src/fs/io/FileOutputStream.hxx index 08ffef2d6..aec4001fe 100644 --- a/src/fs/io/FileOutputStream.hxx +++ b/src/fs/io/FileOutputStream.hxx @@ -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 |