aboutsummaryrefslogtreecommitdiff
path: root/libctf/ctf-open-bfd.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-03-13 06:31:28 -0700
committerH.J. Lu <hjl.tools@gmail.com>2024-03-13 06:55:44 -0700
commit2e384d4f44f15e560b2a068e0ed866438aaa7cd7 (patch)
tree57e59d6af7e7a76acfd3879885e399b509b78951 /libctf/ctf-open-bfd.c
parent32235d90951b4b7c2976c61a28c30d82cb7a7588 (diff)
downloadgdb-2e384d4f44f15e560b2a068e0ed866438aaa7cd7.zip
gdb-2e384d4f44f15e560b2a068e0ed866438aaa7cd7.tar.gz
gdb-2e384d4f44f15e560b2a068e0ed866438aaa7cd7.tar.bz2
bfd: Use MAP_FAILED for mmap failure
Use MAP_FAILED, instead of ((void *) -1), for mmap failure and use ((void *) -1) only if MAP_FAILED is undefined. * bfdio.c (bfd_mmap): Replace (void *) -1 with MAP_FAILED for mmap failure. * bfdwin.c: Don't include <sys/mman.h>. (MAP_FILE): Removed. (bfd_get_file_window): Replace (void *) -1 with MAP_FAILED for mmap failure. * cache.c: Don't include <sys/mman.h>. (cache_bmmap): Replace (void *) -1 with MAP_FAILED for mmap failure. * opncls.c (opncls_bmmap): Likewise. * sysdep.h: Include <sys/mman.h> if HAVE_MMAP is define. (MAP_FILE): New. Defined as 0 if undefined. (MAP_FAILED): New. Defined as ((void *) -1) if undefined.
Diffstat (limited to 'libctf/ctf-open-bfd.c')
0 files changed, 0 insertions, 0 deletions