Merge "debuggerd seccomp: explain why we define PROT_READ/WRITE." am: 665e4c1537 am: 5504477722
am: e1cbc97115

Change-Id: Ife944a1d1074c5e7fe6fc07c41c7931f0237ceb7
diff --git a/debuggerd/seccomp_policy/crash_dump.policy.def b/debuggerd/seccomp_policy/crash_dump.policy.def
index 9190ed7..2ef31b0 100644
--- a/debuggerd/seccomp_policy/crash_dump.policy.def
+++ b/debuggerd/seccomp_policy/crash_dump.policy.def
@@ -33,9 +33,15 @@
 rt_tgsigqueueinfo: 1
 
 #define PR_SET_VMA 0x53564d41
+prctl: arg0 == PR_GET_NO_NEW_PRIVS || arg0 == PR_SET_VMA
+
+#if 0
+libminijail on vendor partitions older than P does not have constants from <sys/mman.h>.
+Define the values of PROT_READ and PROT_WRITE ourselves to maintain backwards compatibility.
+#else
 #define PROT_READ 0x1
 #define PROT_WRITE 0x2
-prctl: arg0 == PR_GET_NO_NEW_PRIVS || arg0 == PR_SET_VMA
+#endif
 
 madvise: 1
 mprotect: arg2 in PROT_READ|PROT_WRITE