gdb.base/info-os.c: Include stdlib.h
authorPedro Alves <palves@redhat.com>
Mon, 23 Feb 2015 14:03:48 +0000 (14:03 +0000)
committerPedro Alves <palves@redhat.com>
Mon, 23 Feb 2015 14:03:48 +0000 (14:03 +0000)
Fixes:

 > gdb compile failed, /gdb/testsuite/gdb.base/info-os.c: In function 'main':
 > /gdb/testsuite/gdb.base/info-os.c:65:3: warning: implicit declaration of function 'atexit' [-Wimplicit-function-declaration]
 >    atexit (ipc_cleanup);
 >    ^
 > FAIL: gdb.base/info-os.exp: cannot compile test program

with recent GCCs.

gdb/testsuite/ChangeLog:
2015-02-23  Pedro Alves  <palves@redhat.com>

* gdb.base/info-os.c: Include stdlib.h.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/info-os.c

index 8540979..276749e 100644 (file)
@@ -1,3 +1,7 @@
+2015-02-23  Pedro Alves  <palves@redhat.com>
+
+       * gdb.base/info-os.c: Include stdlib.h.
+
 2015-02-22  Doug Evans  <xdje42@gmail.com>
 
        PR symtab/17855
index 8ceaaff..5f91eef 100644 (file)
@@ -23,6 +23,7 @@
 #include <arpa/inet.h>
 #include <sys/socket.h>
 #include <unistd.h>
+#include <stdlib.h>
 
 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;