diff mbox series

[1/2] Fallback for MADV_GUARD_* definitions

Message ID 20241203-madvise_guard_install-v1-1-c0485abbfc73@suse.com
State Accepted
Headers show
Series Coverage for MADV_GUARD_* features | expand

Commit Message

Andrea Cervesato Dec. 3, 2024, 1:36 p.m. UTC
From: Andrea Cervesato <andrea.cervesato@suse.com>

Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
 include/lapi/mmap.h | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Petr Vorel Dec. 11, 2024, 12:18 a.m. UTC | #1
Hi Andrea,

obviously correct, thanks!
Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr
diff mbox series

Patch

diff --git a/include/lapi/mmap.h b/include/lapi/mmap.h
index 7512e9f812a065e5485e042ef0eadd1a05e6b63c..ea9730586234eb0ab4d38ba7450a1e3a30dd49b9 100644
--- a/include/lapi/mmap.h
+++ b/include/lapi/mmap.h
@@ -38,6 +38,14 @@ 
 # define MADV_SOFT_OFFLINE 101
 #endif
 
+#ifndef MADV_GUARD_INSTALL
+# define MADV_GUARD_INSTALL 102
+#endif
+
+#ifndef MADV_GUARD_REMOVE
+# define MADV_GUARD_REMOVE 103
+#endif
+
 #ifndef MADV_MERGEABLE
 # define MADV_MERGEABLE   12
 #endif