[klibc] [patch] s390: fix mmap complilation
Heiko Carstens
heiko.carstens at de.ibm.com
Wed Jun 7 04:22:37 PDT 2006
From: Heiko Carstens <heiko.carstens at de.ibm.com>
Fix mmap compilation (missing errno.h include) and use correct minimum
error number for compare.
Signed-off-by: Heiko Carstens <heiko.carstens at de.ibm.com>
---
Does not compile in akpm's latest -mm tree.
usr/klibc/arch/s390/mmap.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/usr/klibc/arch/s390/mmap.c b/usr/klibc/arch/s390/mmap.c
index 2b1935b..4c43779 100644
--- a/usr/klibc/arch/s390/mmap.c
+++ b/usr/klibc/arch/s390/mmap.c
@@ -1,3 +1,4 @@
+#include <errno.h>
#include <sys/types.h>
#include <linux/unistd.h>
@@ -32,7 +33,7 @@ void *__mmap2(void *addr, size_t len, in
: "i"(__NR_mmap2), "0"(__arg1)
: "1", "cc", "memory");
__res = __svcres;
- if (__res >= (unsigned long)-125) {
+ if (__res >= (unsigned long)-4095) {
errno = -__res;
__res = -1;
}
@@ -64,7 +65,7 @@ void * mmap(void * addr, size_t len, int
"0" (__arg1)
: "1", "cc", "memory");
__res = __svcres;
- if (__res >= (unsigned long)-125) {
+ if (__res >= (unsigned long)-4095) {
errno = -__res;
__res = -1;
}
More information about the klibc
mailing list