This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Remove forward declaration of struct stat
- From: Gary Benson <gary at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 17 Mar 2015 11:28:21 -0000
- Subject: [binutils-gdb] Remove forward declaration of struct stat
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7f3647e2ba4517be59ce531ec2297918b998fe3e
commit 7f3647e2ba4517be59ce531ec2297918b998fe3e
Author: Gary Benson <gbenson@redhat.com>
Date: Tue Mar 17 11:26:09 2015 +0000
Remove forward declaration of struct stat
Forward declarations of struct stat break the Windows build.
This commit removes a forward declaration of struct stat and
includes sys/stat.h directly instead.
gdb/ChangeLog:
PR gdb/18131
* common/common-remote-fileio.h (sys/stat.h): New include.
(stuct stat): Remove forward declaration.
Diff:
---
gdb/ChangeLog | 7 +++++++
gdb/common/common-remote-fileio.h | 3 +--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d984565..10abae0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2015-03-17 Gary Benson <gbenson@redhat.com>
+ Luke Allardyce <lukeallardyce@gmail.com>
+
+ PR gdb/18131
+ * common/common-remote-fileio.h (sys/stat.h): New include.
+ (stuct stat): Remove forward declaration.
+
2015-03-16 John Baldwin <jhb@FreeBSD.org>
* fbsd-tdep.c (fbsd_make_corefile_notes): Fetch all target registers
diff --git a/gdb/common/common-remote-fileio.h b/gdb/common/common-remote-fileio.h
index b838186..27bc585 100644
--- a/gdb/common/common-remote-fileio.h
+++ b/gdb/common/common-remote-fileio.h
@@ -21,8 +21,7 @@
#define COMMON_REMOTE_FILEIO_H
#include "gdb/fileio.h"
-
-struct stat;
+#include <sys/stat.h>
/* Pack a host-format integer into a byte buffer in big-endian format
ready for transmission over the remote protocol. BYTES specifies