summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/coremaker.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base/coremaker.c')
-rw-r--r--gdb/testsuite/gdb.base/coremaker.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.base/coremaker.c b/gdb/testsuite/gdb.base/coremaker.c
index 56239e9286f..4bb16d46aa4 100644
--- a/gdb/testsuite/gdb.base/coremaker.c
+++ b/gdb/testsuite/gdb.base/coremaker.c
@@ -6,6 +6,8 @@
#include <fcntl.h>
#include <sys/mman.h>
#include <signal.h>
+#include <stdlib.h>
+#include <unistd.h>
#ifndef __STDC__
#define const /**/
@@ -33,7 +35,6 @@ void
mmapdata ()
{
int j, fd;
- extern void *malloc ();
/* Allocate and initialize a buffer that will be used to write
the file that is later mapped in. */
@@ -112,9 +113,10 @@ func1 ()
func2 ();
}
-main ()
+int main ()
{
mmapdata ();
func1 ();
+ return 0;
}