Skip to content

Commit

Permalink
rst-malloc: Update deprecated MAP_ANON flag
Browse files Browse the repository at this point in the history
travis-ci: success for Fetch mmap_minimal_address and drop MAP_ANON
Signed-off-by: Cyrill Gorcunov <[email protected]>
Signed-off-by: Pavel Emelyanov <[email protected]>
  • Loading branch information
Cyrill Gorcunov authored and xemul committed Dec 29, 2016
1 parent 8fcb62d commit 02a1a79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions criu/rst-malloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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) {
/*
Expand Down

0 comments on commit 02a1a79

Please sign in to comment.