Description: add missing userfaultfd.h defines and struct to allow building with the version in bionic
Author: Olivier Tilloy <olivier.tilloy@canonical.com>

--- a/base/allocator/partition_allocator/starscan/write_protector.cc
+++ b/base/allocator/partition_allocator/starscan/write_protector.cc
@@ -23,6 +23,18 @@
 #include <sys/stat.h>
 #include <sys/syscall.h>
 #include <sys/types.h>
+
+// From a version of linux/userfaultfd.h newer than what is available in bionic
+#define _UFFDIO_WRITEPROTECT        (0x06)
+#define UFFDIO_WRITEPROTECT _IOWR(UFFDIO, _UFFDIO_WRITEPROTECT, \
+                      struct uffdio_writeprotect)
+struct uffdio_writeprotect {
+    struct uffdio_range range;
+#define UFFDIO_WRITEPROTECT_MODE_WP     ((__u64)1<<0)
+#define UFFDIO_WRITEPROTECT_MODE_DONTWAKE   ((__u64)1<<1)
+    __u64 mode;
+};
+
 #endif  // defined(PA_STARSCAN_UFFD_WRITE_PROTECTOR_SUPPORTED)
 
 namespace base {
