|
@@ -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
|