[CRIU] [PATCH 01/16] rst-malloc: Update deprecated MAP_ANON flag
Cyrill Gorcunov
gorcunov at openvz.org
Fri Dec 9 09:17:01 PST 2016
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
criu/rst-malloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/criu/rst-malloc.c b/criu/rst-malloc.c
index 251ca2f17100..4f7357ca28c4 100644
--- a/criu/rst-malloc.c
+++ b/criu/rst-malloc.c
@@ -44,7 +44,7 @@ static int grow_shared(struct rst_mem_type_s *t, unsigned long size)
* new one
*/
aux = mmap(NULL, size, PROT_READ | PROT_WRITE,
- MAP_SHARED | MAP_ANON, 0, 0);
+ MAP_SHARED | MAP_ANONYMOUS, 0, 0);
if (aux == MAP_FAILED)
return -1;
@@ -66,7 +66,7 @@ static int grow_remap(struct rst_mem_type_s *t, int flag, unsigned long size)
* Can't call mremap with NULL address :(
*/
aux = mmap(NULL, size, PROT_READ | PROT_WRITE,
- flag | MAP_ANON, 0, 0);
+ flag | MAP_ANONYMOUS, 0, 0);
else {
if (flag & MAP_SHARED) {
/*
--
2.7.4
More information about the CRIU
mailing list