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]

Include <string.h> in sysdeps/unix/sysv/linux/mmap64.c


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


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