This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Include <string.h> in sysdeps/unix/sysv/linux/mmap64.c
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: <libc-alpha at sourceware dot org>, David Holsgrove <david dot holsgrove at xilinx dot com>
- Date: Tue, 20 Aug 2013 19:40:05 +0000
- Subject: Include <string.h> in sysdeps/unix/sysv/linux/mmap64.c
- References: <Pine dot LNX dot 4 dot 64 dot 1306281549400 dot 27363 at digraph dot polyomino dot org dot uk> <87obaqgjlq dot fsf at igel dot home> <Pine dot LNX dot 4 dot 64 dot 1306282023500 dot 15167 at digraph dot polyomino dot org dot uk> <Pine dot LNX dot 4 dot 64 dot 1308201646040 dot 15834 at digraph dot polyomino dot org dot uk> <87a9kcp582 dot fsf at igel dot home>
On Tue, 20 Aug 2013, Andreas Schwab wrote:
> "Joseph S. Myers" <joseph@codesourcery.com> writes:
>
> > All the pending fixes for sysdeps/unix/sysv/linux/mmap64.c's
> > MMAP2_PAGE_SHIFT == -1 case are now checked in. Ping for this patch
> > <http://sourceware.org/ml/libc-ports/2013-06/msg00067.html> (untested)
> > that makes m68k use that case.
>
> ../sysdeps/unix/sysv/linux/mmap64.c:46:7: warning: implicit declaration of function '__ffs' [-Wimplicit-function-declaration]
> page_shift = __ffs (page_size) - 1;
> ^
I've committed this patch as obvious to add an include of <string.h>.
diff --git a/ChangeLog b/ChangeLog
index d6eb8dc..70771d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2013-08-20 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/unix/sysv/linux/mmap64.c: Include <string.h>.
+
* sysdeps/unix/sysv/linux/mmap64.c (__mmap64)
[MMAP2_PAGE_SHIFT == -1]: Use __getpagesize to determine page
size. Use __ffs to determine corresponding shift.
diff --git a/sysdeps/unix/sysv/linux/mmap64.c b/sysdeps/unix/sysv/linux/mmap64.c
index 4ba686c..7d367ca 100644
--- a/sysdeps/unix/sysv/linux/mmap64.c
+++ b/sysdeps/unix/sysv/linux/mmap64.c
@@ -19,6 +19,7 @@
#include <errno.h>
#include <unistd.h>
#include <sys/mman.h>
+#include <string.h>
#include <sysdep.h>
#include <sys/syscall.h>
--
Joseph S. Myers
joseph@codesourcery.com