mmap.c 504 B

1234567891011121314151617181920
  1. /* Use new style mmap for mips */
  2. #include <unistd.h>
  3. #include <errno.h>
  4. #include <sys/mman.h>
  5. #include <sys/syscall.h>
  6. #if 0
  7. /* For now, leave mmap using mmap1 since mmap2 seems
  8. * to have issues (i.e. it doesn't work 100% properly).
  9. */
  10. #ifdef __NR_mmap2
  11. # undef __NR_mmap
  12. # define __NR_mmap __NR_mmap2
  13. #endif
  14. #endif
  15. #define __NR___mmap __NR_mmap
  16. attribute_hidden _syscall6 (__ptr_t, __mmap, __ptr_t, addr, size_t, len, int, prot,
  17. int, flags, int, fd, __off_t, offset);
  18. strong_alias(__mmap,mmap)