From 0acdf1ed946c5c279c1eb18637d1bb3358a54084 Mon Sep 17 00:00:00 2001 From: Alexander Clouter Date: Sat, 22 Sep 2018 22:03:54 +0100 Subject: [PATCH] stop make putting std{out,err} into append mode and tripping up SELinux --- packages/make/no-append.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 packages/make/no-append.patch diff --git a/packages/make/no-append.patch b/packages/make/no-append.patch new file mode 100644 index 000000000..159397882 --- /dev/null +++ b/packages/make/no-append.patch @@ -0,0 +1,15 @@ +diff --git a/output.c b/output.c +index 65182c4..efa98ad 100644 +--- a/output.c ++++ b/output.c +@@ -157,6 +157,10 @@ log_working_directory (int entering) + static void + set_append_mode (int fd) + { ++#ifdef __ANDROID__ ++ /* SELinux has a deny rule for append on stderr (eg. SCM_RIGHTS returns MSG_CTRUNC) */ ++ if (isatty(fd)) return; ++#endif + #if defined(F_GETFL) && defined(F_SETFL) && defined(O_APPEND) + int flags = fcntl (fd, F_GETFL, 0); + if (flags >= 0)