mmap.c 600 B

1234567891011121314151617181920212223242526
  1. /* Use new style mmap for mips */
  2. /*
  3. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  4. *
  5. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  6. */
  7. #include <unistd.h>
  8. #include <errno.h>
  9. #include <sys/mman.h>
  10. #include <sys/syscall.h>
  11. #if 0
  12. /* For now, leave mmap using mmap1 since mmap2 seems
  13. * to have issues (i.e. it doesn't work 100% properly).
  14. */
  15. #ifdef __NR_mmap2
  16. # undef __NR_mmap
  17. # define __NR_mmap __NR_mmap2
  18. #endif
  19. #endif
  20. _syscall6 (__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot,
  21. int, flags, int, fd, __off_t, offset)
  22. libc_hidden_def(mmap)