This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Fix build...
- From: David Miller <davem at davemloft dot net>
- To: libc-alpha at sourceware dot org
- Date: Tue, 30 Mar 2010 23:42:09 -0700 (PDT)
- Subject: [PATCH] Fix build...
This change:
* sysdeps/unix/sysv/linux/mmap64.c: Allow variable shift values.
Broke the build on sparc.
../sysdeps/unix/sysv/linux/mmap64.c: In function '__mmap64':
../sysdeps/unix/sysv/linux/mmap64.c:52:26: warning: extra tokens at end of #ifdef directive
../sysdeps/unix/sysv/linux/mmap64.c:56:7: error: lvalue required as increment operand
Here is the fix:
2010-03-30 David S. Miller <davem@davemloft.net>
* sysdeps/unix/sysv/linux/mmap64.c (__mmap64): Fix
MMAP2_PAGE_SHIFT test.
diff --git a/sysdeps/unix/sysv/linux/mmap64.c b/sysdeps/unix/sysv/linux/mmap64.c
index 85c801d..b24b3f0 100644
--- a/sysdeps/unix/sysv/linux/mmap64.c
+++ b/sysdeps/unix/sysv/linux/mmap64.c
@@ -49,7 +49,7 @@ void *
__mmap64 (void *addr, size_t len, int prot, int flags, int fd, off64_t offset)
{
#ifdef __NR_mmap2
-# ifdef MMAP2_PAGE_SHIFT == -1
+# if MMAP2_PAGE_SHIFT == -1
if (page_shift == 0)
{
int page_size = getpagesize ();