Fix gdb.base/catch-fork-kill.c compilation
authorPedro Alves <palves@redhat.com>
Tue, 1 Mar 2016 17:11:57 +0000 (17:11 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 1 Mar 2016 17:11:57 +0000 (17:11 +0000)
Fixes:

 Running .../src/gdb/testsuite/gdb.base/catch-fork-kill.exp ...
 gdb compile failed, .../src/gdb/testsuite/gdb.base/catch-fork-kill.c: In function 'main':
 .../src/gdb/testsuite/gdb.base/catch-fork-kill.c:81:4: warning: implicit declaration of function 'wait' [-Wimplicit-function-declaration]
     wait (NULL);
     ^

gdb/testsuite/ChangeLog:
2016-03-01  Pedro Alves  <palves@redhat.com>

* gdb.base/catch-fork-kill.c: Include <sys/wait.h>.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/catch-fork-kill.c

index d77645a34507a6a2141668ab6f04486c565ac372..49e87bc17e59b8174d088da63488974597de1acc 100644 (file)
@@ -1,3 +1,7 @@
+2016-03-01  Pedro Alves  <palves@redhat.com>
+
+       * gdb.base/catch-fork-kill.c: Include <sys/wait.h>.
+
 2016-03-01  Yao Qi  <yao.qi@linaro.org>
 
        * gdb.arch/arm-disp-step.exp: Use standard_testfile and
index 607df2e0b47166aca63d114948bc919b6f609361..eb5a33b551b4e5f7abcef0a6803f62ececa28b6a 100644 (file)
@@ -19,6 +19,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <assert.h>
+#include <sys/wait.h>
 
 int fds[2] = { -1, -1 };