Skip to content

Commit

Permalink
Not all systems define MAP_FAILED for the return value from failing m…
Browse files Browse the repository at this point in the history
…map() (#502)
  • Loading branch information
nbriggs authored May 13, 2024
1 parent 40a1a8d commit 4becc6a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ldsout.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4becc6a

Please sign in to comment.