]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/mini-os.git/commitdiff
minios: add select definition to sys/time.h when HAVE_LIBC is defined
authorMatthew Fioravante <matthew.fioravante@jhuapl.edu>
Tue, 9 Oct 2012 09:39:09 +0000 (10:39 +0100)
committerMatthew Fioravante <matthew.fioravante@jhuapl.edu>
Tue, 9 Oct 2012 09:39:09 +0000 (10:39 +0100)
This patch adds the select function to sys/time.h when HAVE_LIBC is
defined, which is according to standard (see the select() manpage).
It also removes a redudant lwip include from posix/sys/select.h.

Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
include/posix/sys/select.h
include/sys/time.h

index a9337be4fc3e9ca46ae1c390e6a142d2096be00f..5132c512245cca0b697cd8c71380010cf6648544 100644 (file)
@@ -2,7 +2,6 @@
 #define _POSIX_SELECT_H
 
 #include <sys/time.h>
-#include <lwip/sockets.h>
 int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
 
 #endif /* _POSIX_SELECT_H */
index d6623a4e774c69d02f9dd9d2caec5e5f19eba610..3be3653c4ffb4dd19df3e22ffb321ac65d21197b 100644 (file)
@@ -22,6 +22,7 @@
 
 #ifdef HAVE_LIBC
 #include_next <sys/time.h>
+
 #else
 struct timespec {
     time_t      tv_sec;
@@ -37,6 +38,10 @@ struct timeval {
 };
 
 int      gettimeofday(struct timeval *tv, void *tz);
+
+#endif
+#ifdef HAVE_LIBC
+#include <sys/select.h>
 #endif
 
 #endif /* _MINIOS_SYS_TIME_H_ */