From: Mike Frysinger Date: Wed, 29 Jul 2015 15:35:37 +0000 (-0400) Subject: mmap64: fix undef warnings X-Git-Tag: glibc-2.23~724 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=182d6096fe76b3d63b1151090cd07e60eca39302;p=thirdparty%2Fglibc.git 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. --- diff --git a/ChangeLog b/ChangeLog index 37a825ef692..a05d2625b52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-08-05 Mike Frysinger + + * sysdeps/unix/sysv/linux/mmap64.c: Move MMAP2_PAGE_SHIFT define + before first use. + 2015-08-05 Mike Frysinger * nptl/allocatestack.c (allocate_stack): Move stacktop decl down to diff --git a/sysdeps/unix/sysv/linux/mmap64.c b/sysdeps/unix/sysv/linux/mmap64.c index a8da641d2b3..0b160b6f6b0 100644 --- a/sysdeps/unix/sysv/linux/mmap64.c +++ b/sysdeps/unix/sysv/linux/mmap64.c @@ -25,12 +25,12 @@ #include /* 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