This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] Include unistd.h in gdbserver/event-loop.c.


Hi.

Another problem with the android port is that event-loop.c
doesn't compile because fd_set isn't defined.
remote-utils.c does compile; it also uses fd_set so I copied
the relevant header from there.

Ok to check in?

2009-12-18  Doug Evans  <dje@google.com>

	* event-loop.c: Include unistd.h if it exists.

Index: event-loop.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/event-loop.c,v
retrieving revision 1.2
diff -u -p -r1.2 event-loop.c
--- event-loop.c	1 Apr 2009 22:48:05 -0000	1.2
+++ event-loop.c	19 Dec 2009 00:51:24 -0000
@@ -34,6 +34,11 @@
 #include <errno.h>
 #endif
 
+/* To get fd_set on android.  */
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
 typedef struct gdb_event gdb_event;
 typedef void (event_handler_func) (int);
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]