This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] mmap64: fix undef warnings


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]