mmap.c 625 B

123456789101112131415161718192021222324252627
  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. libc_hidden_proto(mmap)
  12. #if 0
  13. /* For now, leave mmap using mmap1 since mmap2 seems
  14. * to have issues (i.e. it doesn't work 100% properly).
  15. */
  16. #ifdef __NR_mmap2
  17. # undef __NR_mmap
  18. # define __NR_mmap __NR_mmap2
  19. #endif
  20. #endif
  21. _syscall6 (__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot,
  22. int, flags, int, fd, __off_t, offset);
  23. libc_hidden_def(mmap)