[PATCH] mmap64: fix undef warnings
Mike Frysinger
vapier@gentoo.org
Wed Jul 29 15:47:00 GMT 2015
The only target that defines this is m68k, so move the existing fallback
define up to avoid warnings on other systems.
2015-07-29 Mike Frysinger <vapier@gentoo.org>
* sysdeps/unix/sysv/linux/mmap64.c: Move MMAP2_PAGE_SHIFT define
before first use.
---
sysdeps/unix/sysv/linux/mmap64.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/mmap64.c b/sysdeps/unix/sysv/linux/mmap64.c
index a8da641..0b160b6 100644
--- a/sysdeps/unix/sysv/linux/mmap64.c
+++ b/sysdeps/unix/sysv/linux/mmap64.c
@@ -25,12 +25,12 @@
#include <sys/syscall.h>
/* This is always 12, even on architectures where PAGE_SHIFT != 12. */
+#ifndef MMAP2_PAGE_SHIFT
+# define MMAP2_PAGE_SHIFT 12
+#endif
#if MMAP2_PAGE_SHIFT == -1
static int page_shift;
#else
-# ifndef MMAP2_PAGE_SHIFT
-# define MMAP2_PAGE_SHIFT 12
-# endif
#define page_shift MMAP2_PAGE_SHIFT
#endif
--
2.4.4
More information about the Libc-alpha
mailing list