This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[pushed] gdb.base/info-os.c: Include stdlib.h (was: Re: GNU gdb (GDB) 7.9.50.20150222-cvs s390x-ibm-linux-gnu GIT commit: 96553a0cffb30d2ac6068eb71bed38ea7432073b)
- From: Pedro Alves <palves at redhat dot com>
- To: GDB Patches <gdb-patches at sourceware dot org>
- Cc: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>, gdb-testers at sourceware dot org
- Date: Mon, 23 Feb 2015 14:07:41 +0000
- Subject: [pushed] gdb.base/info-os.c: Include stdlib.h (was: Re: GNU gdb (GDB) 7.9.50.20150222-cvs s390x-ibm-linux-gnu GIT commit: 96553a0cffb30d2ac6068eb71bed38ea7432073b)
- Authentication-results: sourceware.org; auth=none
- References: <201502220739 dot t1M7dTcZ013874 at d06av09 dot portsmouth dot uk dot ibm dot com>
Happened to notice this while skimming gdb-testers@:
> 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
I don't have newer GCC handy, but I'm sure this should fix it. Pushed.
-------
>From e5b85ead638e4916ee188698e434dd1940e484e4 Mon Sep 17 00:00:00 2001
From: Pedro Alves <palves@redhat.com>
Date: Mon, 23 Feb 2015 14:03:48 +0000
Subject: [PATCH] gdb.base/info-os.c: Include stdlib.h
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 | 4 ++++
gdb/testsuite/gdb.base/info-os.c | 1 +
2 files changed, 5 insertions(+)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 8540979..276749e 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -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
diff --git a/gdb/testsuite/gdb.base/info-os.c b/gdb/testsuite/gdb.base/info-os.c
index 8ceaaff..5f91eef 100644
--- a/gdb/testsuite/gdb.base/info-os.c
+++ b/gdb/testsuite/gdb.base/info-os.c
@@ -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;
--
1.9.3