about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2013-11-21 15:49:50 -0800
committerRoland McGrath <roland@hack.frob.com>2013-11-21 15:49:50 -0800
commit070906ffd305b9c439d6d04af26e1ecae2394fe8 (patch)
tree88467b8900f072189dea1827208d07dfe7913331
parent6851bd4d97546fc7378864d36f42f9d2df15dac5 (diff)
downloadglibc-070906ffd305b9c439d6d04af26e1ecae2394fe8.tar.gz
glibc-070906ffd305b9c439d6d04af26e1ecae2394fe8.tar.xz
glibc-070906ffd305b9c439d6d04af26e1ecae2394fe8.zip
Add missing #include for malloc/hooks.c code.
-rw-r--r--ChangeLog3
-rw-r--r--malloc/malloc.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ee88097225..b9201fc7ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2013-11-21  Roland McGrath  <roland@hack.frob.com>
 
+	* malloc/malloc.c: Move #include <sys/param.h> to the top; comment why
+	it's there.
+
 	* sysdeps/generic/sys/swap.h (swapon): Add FLAGS argument to prototype.
 
 2013-11-21  Meador Inge  <meadori@codesourcery.com>
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 0181717057..c8a5374e65 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -238,6 +238,9 @@
 /* For va_arg, va_start, va_end.  */
 #include <stdarg.h>
 
+/* For MIN, MAX, powerof2.  */
+#include <sys/param.h>
+
 
 /*
   Debugging:
@@ -4875,8 +4878,6 @@ malloc_printerr(int action, const char *str, void *ptr)
     abort ();
 }
 
-#include <sys/param.h>
-
 /* We need a wrapper function for one of the additions of POSIX.  */
 int
 __posix_memalign (void **memptr, size_t alignment, size_t size)