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

@@ -76,6 +76,10 @@
# define MAP_ANON MAP_ANONYMOUS
#endif
#ifndef MAP_FAILED
# define MAP_FAILED ((void *) -1)
#endif
#define REPEAT 5
#define min(a, b) (((a) < (b)) ? (a) : (b))