minijail: add local definitions of MADV_FREE and __NR_membarrier am: 45b8aa4693

Original change: https://android-review.googlesource.com/c/platform/external/minijail/+/2366449

Change-Id: I510bc65fe11cc6dc7970f7189464a7faee229ee5
Signed-off-by: Automerger Merge Worker <[email protected]>
diff --git a/gen_constants-inl.h b/gen_constants-inl.h
index f5fdd29..d09349c 100644
--- a/gen_constants-inl.h
+++ b/gen_constants-inl.h
@@ -73,3 +73,7 @@
 #if !defined(FS_IOC_GET_ENCRYPTION_POLICY_EX)
 #define FS_IOC_GET_ENCRYPTION_POLICY_EX _IOWR('f', 22, __u8[9])
 #endif
+
+#if !defined(MADV_FREE)
+#define MADV_FREE 8
+#endif
diff --git a/gen_syscalls-inl.h b/gen_syscalls-inl.h
index 7a2f230..aee71e2 100644
--- a/gen_syscalls-inl.h
+++ b/gen_syscalls-inl.h
@@ -92,3 +92,13 @@
 #endif
 
 #endif /* __NR_rseq */
+
+#ifndef __NR_membarrier
+#ifdef __x86_64__
+#define __NR_membarrier 324
+#elif __i386__
+#define __NR_membarrier 375
+#elif __arm64__
+#define __NR_membarrier 283
+#endif
+#endif /* __NR_membarrier */