add MCL_ONFAULT and MLOCK_ONFAULT mlockall and mlock2 flags
they lock faulted pages into memory (useful when a small part of a
large mapped file needs efficient access), new in linux v4.4, commit
b0f205c2a3082dd9081f9a94e50658c5fa906ff1
MLOCK_* is not in the POSIX reserved namespace for sys/mman.h
diff --git a/arch/aarch64/bits/mman.h b/arch/aarch64/bits/mman.h
index ce5519f..31ece5b 100644
--- a/arch/aarch64/bits/mman.h
+++ b/arch/aarch64/bits/mman.h
@@ -36,6 +36,7 @@
#define MCL_CURRENT 1
#define MCL_FUTURE 2
+#define MCL_ONFAULT 4
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define MADV_NORMAL 0
diff --git a/arch/arm/bits/mman.h b/arch/arm/bits/mman.h
index cc854aa..ea6f6a7 100644
--- a/arch/arm/bits/mman.h
+++ b/arch/arm/bits/mman.h
@@ -37,6 +37,7 @@
#define MCL_CURRENT 1
#define MCL_FUTURE 2
+#define MCL_ONFAULT 4
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define MADV_NORMAL 0
diff --git a/arch/i386/bits/mman.h b/arch/i386/bits/mman.h
index 0f53acb..0c9022f 100644
--- a/arch/i386/bits/mman.h
+++ b/arch/i386/bits/mman.h
@@ -38,6 +38,7 @@
#define MCL_CURRENT 1
#define MCL_FUTURE 2
+#define MCL_ONFAULT 4
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define MADV_NORMAL 0
diff --git a/arch/microblaze/bits/mman.h b/arch/microblaze/bits/mman.h
index cc854aa..ea6f6a7 100644
--- a/arch/microblaze/bits/mman.h
+++ b/arch/microblaze/bits/mman.h
@@ -37,6 +37,7 @@
#define MCL_CURRENT 1
#define MCL_FUTURE 2
+#define MCL_ONFAULT 4
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define MADV_NORMAL 0
diff --git a/arch/mips/bits/mman.h b/arch/mips/bits/mman.h
index 3125fc2..cb9ac53 100644
--- a/arch/mips/bits/mman.h
+++ b/arch/mips/bits/mman.h
@@ -37,6 +37,7 @@
#define MCL_CURRENT 1
#define MCL_FUTURE 2
+#define MCL_ONFAULT 4
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define MADV_NORMAL 0
diff --git a/arch/or1k/bits/mman.h b/arch/or1k/bits/mman.h
index cc854aa..ea6f6a7 100644
--- a/arch/or1k/bits/mman.h
+++ b/arch/or1k/bits/mman.h
@@ -37,6 +37,7 @@
#define MCL_CURRENT 1
#define MCL_FUTURE 2
+#define MCL_ONFAULT 4
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define MADV_NORMAL 0
diff --git a/arch/powerpc/bits/mman.h b/arch/powerpc/bits/mman.h
index 779fdde..6581edc 100644
--- a/arch/powerpc/bits/mman.h
+++ b/arch/powerpc/bits/mman.h
@@ -38,6 +38,7 @@
#define MCL_CURRENT 0x2000
#define MCL_FUTURE 0x4000
+#define MCL_ONFAULT 0x8000
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define MADV_NORMAL 0
diff --git a/arch/sh/bits/mman.h b/arch/sh/bits/mman.h
index f6fc98f..3a25df1 100644
--- a/arch/sh/bits/mman.h
+++ b/arch/sh/bits/mman.h
@@ -38,6 +38,7 @@
#define MCL_CURRENT 1
#define MCL_FUTURE 2
+#define MCL_ONFAULT 4
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define MADV_NORMAL 0
diff --git a/arch/x32/bits/mman.h b/arch/x32/bits/mman.h
index 846b7ea..f3235f4 100644
--- a/arch/x32/bits/mman.h
+++ b/arch/x32/bits/mman.h
@@ -38,6 +38,7 @@
#define MCL_CURRENT 1
#define MCL_FUTURE 2
+#define MCL_ONFAULT 4
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define MADV_NORMAL 0
diff --git a/arch/x86_64/bits/mman.h b/arch/x86_64/bits/mman.h
index 846b7ea..f3235f4 100644
--- a/arch/x86_64/bits/mman.h
+++ b/arch/x86_64/bits/mman.h
@@ -38,6 +38,7 @@
#define MCL_CURRENT 1
#define MCL_FUTURE 2
+#define MCL_ONFAULT 4
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define MADV_NORMAL 0
diff --git a/include/sys/mman.h b/include/sys/mman.h
index 9fc2db5..a1864ec 100644
--- a/include/sys/mman.h
+++ b/include/sys/mman.h
@@ -39,6 +39,7 @@
#endif
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#define MLOCK_ONFAULT 0x01
int madvise (void *, size_t, int);
int mincore (void *, size_t, unsigned char *);
#endif