[PATCH 3/7] gdbserver: avoid empty structs when not using GCC
Mircea Gherzan
mircea.gherzan@intel.com
Thu Jun 27 08:44:00 GMT 2013
2013-06-25 Mircea Gherzan <mircea.gherzan@intel.com>
gdbserver/
* notif.h (notif_event): Add a dummy member to avoid compiler
errors when not using GCC.
Signed-off-by: Mircea Gherzan <mircea.gherzan@intel.com>
---
gdb/gdbserver/notif.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gdb/gdbserver/notif.h b/gdb/gdbserver/notif.h
index 608b763..ed3c714 100644
--- a/gdb/gdbserver/notif.h
+++ b/gdb/gdbserver/notif.h
@@ -27,6 +27,10 @@
typedef struct notif_event
{
+#ifndef __GNUC__
+ /* C requires that a struct or union has at least one member. */
+ char dummy;
+#endif
} *notif_event_p;
DECLARE_QUEUE_P (notif_event_p);
--
1.7.12.4
More information about the Gdb-patches
mailing list