summaryrefslogtreecommitdiff
path: root/toolchain/uClibc/uClibc-0.9.29-001-fix-mmap.patch
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-06-28 12:14:16 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-06-28 12:14:16 +0000
commit371d0121432167b57cf95853910774384f2a3c4d (patch)
tree1dddda34d92c00d0d5dde83143bda92a52c2218c /toolchain/uClibc/uClibc-0.9.29-001-fix-mmap.patch
parent7dde1b9e71eec44ffb826453a2bc1d9819128c3e (diff)
- pull arm mmap fix from trunk
Diffstat (limited to 'toolchain/uClibc/uClibc-0.9.29-001-fix-mmap.patch')
-rw-r--r--toolchain/uClibc/uClibc-0.9.29-001-fix-mmap.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/toolchain/uClibc/uClibc-0.9.29-001-fix-mmap.patch b/toolchain/uClibc/uClibc-0.9.29-001-fix-mmap.patch
new file mode 100644
index 000000000..d1de25d7c
--- /dev/null
+++ b/toolchain/uClibc/uClibc-0.9.29-001-fix-mmap.patch
@@ -0,0 +1,22 @@
+--- uClibc-0.9.29/libc/sysdeps/linux/arm/mmap.c 2007-03-08 19:00:42.000000000 +0100
++++ uClibc/libc/sysdeps/linux/arm/mmap.c 2007-05-16 12:53:23.000000000 +0200
+@@ -39,9 +39,17 @@
+ {
+ /* check if offset is page aligned */
+ if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1))
++ {
++ __set_errno(EINVAL);
+ return MAP_FAILED;
+- return (__ptr_t) _mmap (addr, len, prot, flags,
+- fd,(off_t) (offset >> MMAP2_PAGE_SHIFT));
++ }
++#ifdef __USE_FILE_OFFSET64
++ return (__ptr_t) _mmap (addr, len, prot, flags,
++ fd, ((__u_quad_t) offset >> MMAP2_PAGE_SHIFT));
++#else
++ return (__ptr_t) _mmap (addr, len, prot, flags,
++ fd, ((__u_long) offset >> MMAP2_PAGE_SHIFT));
++#endif
+ }
+ #elif defined (__NR_mmap)
+ # define __NR__mmap __NR_mmap