|
@@ -104,8 +104,7 @@ static inline _syscall0(gid_t, _dl_getpid);
|
|
static inline _syscall3(int, _dl_readlink, const char *, path, char *, buf, size_t, bufsiz);
|
|
static inline _syscall3(int, _dl_readlink, const char *, path, char *, buf, size_t, bufsiz);
|
|
|
|
|
|
#ifdef __NR_mmap
|
|
#ifdef __NR_mmap
|
|
-#if defined(__powerpc__) || defined(__mips__) || defined(__sh__) || defined(__sparc__) || defined(__x86_64__)
|
|
+#ifdef MMAP_HAS_6_ARGS
|
|
-/* PowerPC, MIPS and SuperH have a different calling convention for mmap(). */
|
|
|
|
#define __NR__dl_mmap __NR_mmap
|
|
#define __NR__dl_mmap __NR_mmap
|
|
static inline _syscall6(void *, _dl_mmap, void *, start, size_t, length,
|
|
static inline _syscall6(void *, _dl_mmap, void *, start, size_t, length,
|
|
int, prot, int, flags, int, fd, off_t, offset);
|
|
int, prot, int, flags, int, fd, off_t, offset);
|
|
@@ -141,6 +140,8 @@ static inline void * _dl_mmap(void * addr, unsigned long size, int prot,
|
|
return(__syscall_mmap2(addr, size, prot, flags,
|
|
return(__syscall_mmap2(addr, size, prot, flags,
|
|
fd, (off_t) (offset >> MMAP2_PAGE_SHIFT)));
|
|
fd, (off_t) (offset >> MMAP2_PAGE_SHIFT)));
|
|
}
|
|
}
|
|
|
|
+#else
|
|
|
|
+#error Your architecture doesn't provide mmap() !?
|
|
#endif
|
|
#endif
|
|
|
|
|
|
#endif /* _LD_SYSCALL_H_ */
|
|
#endif /* _LD_SYSCALL_H_ */
|