This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] mmap64: fix undef warnings
- From: Mike Frysinger <vapier at gentoo dot org>
- To: libc-alpha at sourceware dot org
- Date: Wed, 29 Jul 2015 11:47:08 -0400
- Subject: [PATCH] mmap64: fix undef warnings
- Authentication-results: sourceware.org; auth=none
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