mmap: add define for MAP_FILE

This is unused but defined in Darwin, BSD, and Linux.

It allows developers to feel good about specifying that they want to map
a file (which is the default behavior anyway). The value is 0, so
specifying this flag does not have any effect.

This allows to more easily compile code that uses the flag.

Change-Id: I7a880a3090d90b7e8cef5144e82f71beb61147a8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9152
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
PulkoMandy
2025-04-03 18:39:00 +00:00
committed by waddlesplash
parent 6b246eafbd
commit ed280bfcfa
+1
View File
@@ -18,6 +18,7 @@
#define PROT_NONE 0x00
/* mmap() flags */
#define MAP_FILE 0x00 /* map a file to memory (this is the default behavior) */
#define MAP_SHARED 0x01 /* changes are seen by others */
#define MAP_PRIVATE 0x02 /* changes are only seen by caller */
#define MAP_FIXED 0x04 /* require mapping to specified addr */