Define MAP_FAILED where relevant if undefined

On systems such as HP-UX 10.20, MAP_FAILED is not
defined.
This commit is contained in:
Larkin Nickle
2021-10-21 19:15:15 -04:00
parent cccefb962b
commit 07bdfeedb8
3 changed files with 12 additions and 0 deletions

View File

@@ -116,6 +116,10 @@ static int xxxprintf(char **, size_t, int, const char *, va_list);
# define MAP_ANON MAP_ANONYMOUS
#endif
#ifndef MAP_FAILED
# define MAP_FAILED ((void *) -1)
#endif
/*
* Allocate "size" bytes via mmap.
*/