about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCarlos O'Donell <carlos@redhat.com>2016-10-28 12:43:15 -0400
committerCarlos O'Donell <carlos@redhat.com>2016-10-28 12:45:27 -0400
commitc31746887dc5007f7b77f8f99b5e9335bebec167 (patch)
tree0a5ad1f722bc30ab5991a2c6d1b738386b8bfdb3
parent0e6d3adc60d8073397af6a320e594d98d7fbedde (diff)
downloadglibc-c31746887dc5007f7b77f8f99b5e9335bebec167.tar.gz
glibc-c31746887dc5007f7b77f8f99b5e9335bebec167.tar.xz
glibc-c31746887dc5007f7b77f8f99b5e9335bebec167.zip
Add missing include for stdlib.h.
The test math/test-nan-overflow uses malloc without including
stdlib.h. On -Os builds for i486 the header inclusion order
is altered enough that the test fails to build because of the
warning which is turned into an error.

The obvious fix is to include stdlib.h since malloc is being
used directly.
-rw-r--r--ChangeLog4
-rw-r--r--math/test-nan-overflow.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 995720ec69..6c6caab25d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-10-28  Carlos O'Donell  <carlos@redhat.com>
+
+	* math/test-nan-overflow.c: Include stdlib.h for malloc.
+
 2016-10-28  H.J. Lu  <hongjiu.lu@intel.com>
 
 	[BZ #20019]
diff --git a/math/test-nan-overflow.c b/math/test-nan-overflow.c
index 40aae2ed14..745a044b96 100644
--- a/math/test-nan-overflow.c
+++ b/math/test-nan-overflow.c
@@ -20,6 +20,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <sys/resource.h>
+#include <stdlib.h>
 
 #define STACK_LIM 1048576
 #define STRING_SIZE (2 * STACK_LIM)