mirror of
https://github.com/Interlisp/maiko.git
synced 2026-02-14 19:56:28 +00:00
Not all systems define MAP_FAILED for the return value from failing mmap() (#502)
This commit is contained in:
@@ -15,7 +15,10 @@
|
||||
#include <stdio.h> // for perror, fprintf, printf, stderr, sprintf
|
||||
#include <stdlib.h> // for exit, free, malloc
|
||||
#include <string.h> // for memset
|
||||
#include <sys/mman.h> // for mmap
|
||||
#include <sys/mman.h> // for mmap, MAP_FAILED
|
||||
#ifndef MAP_FAILED
|
||||
#define MAP_FAILED ((void *)-1)
|
||||
#endif
|
||||
#include <sys/stat.h> // for stat, fstat
|
||||
#include <sys/types.h> // for off_t
|
||||
#include <unistd.h> // for lseek, read, close, getpagesize
|
||||
|
||||
Reference in New Issue
Block a user