aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfdwin.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/bfdwin.c')
-rw-r--r--bfd/bfdwin.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/bfd/bfdwin.c b/bfd/bfdwin.c
index beb1739..2919c71 100644
--- a/bfd/bfdwin.c
+++ b/bfd/bfdwin.c
@@ -31,14 +31,6 @@
#undef HAVE_MPROTECT /* code's not tested yet */
-#if HAVE_MMAP || HAVE_MPROTECT || HAVE_MADVISE
-#include <sys/mman.h>
-#endif
-
-#ifndef MAP_FILE
-#define MAP_FILE 0
-#endif
-
static int debug_windows;
/* The idea behind the next and refcount fields is that one mapped
@@ -234,7 +226,7 @@ bfd_get_file_window (bfd *abfd,
? MAP_FILE | MAP_PRIVATE
: MAP_FILE | MAP_SHARED),
fd, file_offset);
- if (i->data == (void *) -1)
+ if (i->data == MAP_FAILED)
{
/* An error happened. Report it, or try using malloc, or
something. */