xfsprogs: Patch to fix compilation issue on MIPS.

This commit is contained in:
Linux-BSD 2018-12-02 19:26:55 -06:00 committed by Enno Boland
parent d0153b62cb
commit 32a4b57770

View file

@ -0,0 +1,26 @@
--- io/mmap.c
+++ io/mmap.c
@@ -189,7 +189,11 @@
prot |= PROT_EXEC;
break;
case 'S':
+ #ifdef MAP_SYNC
flags = MAP_SYNC | MAP_SHARED_VALIDATE;
+ #else
+ flags = MAP_SHARED_VALIDATE;
+ #endif
/*
* If MAP_SYNC and MAP_SHARED_VALIDATE aren't defined
@@ -269,7 +273,11 @@
mapping->offset = offset;
mapping->name = filename;
mapping->prot = prot;
+ #ifdef MAP_SYNC
mapping->map_sync = (flags == (MAP_SYNC | MAP_SHARED_VALIDATE));
+ #else
+ mapping->map_sync = (flags == (MAP_SHARED_VALIDATE));
+ #endif
return 0;
}