summaryrefslogtreecommitdiff
path: root/ldso/ldso/syscall.h
diff options
context:
space:
mode:
Diffstat (limited to 'ldso/ldso/syscall.h')
-rw-r--r--ldso/ldso/syscall.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ldso/ldso/syscall.h b/ldso/ldso/syscall.h
index 013cc6fb7..322c618f6 100644
--- a/ldso/ldso/syscall.h
+++ b/ldso/ldso/syscall.h
@@ -17,6 +17,12 @@ static inline _syscall1(void, _dl_exit, int, status);
static inline _syscall1(int, _dl_close, int, fd);
+#ifdef __powerpc__
+/* PowerPC has a different calling convention for mmap(). */
+#define __NR__dl_mmap __NR_mmap
+static inline _syscall6(void *, _dl_mmap, void *, start, size_t, length,
+ int, prot, int, flags, int, fd, off_t, offset);
+#else
#define __NR__dl_mmap_real __NR_mmap
static inline _syscall1(void *, _dl_mmap_real, unsigned long *, buffer);
@@ -33,6 +39,8 @@ static inline void * _dl_mmap(void * addr, unsigned long size, int prot,
buffer[5] = (unsigned long) offset;
return (void *) _dl_mmap_real(buffer);
}
+#endif
+
#ifndef _dl_MAX_ERRNO
#define _dl_MAX_ERRNO 4096
#endif