void-packages/srcpkgs/xfsprogs/patches/00-patch-for-mips.diff

27 lines
565 B
Diff
Raw Normal View History

--- 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;
}