Mailing List Archive

[PATCH vtpm v3 06/12] add select definition to sys/time.h when HAVE_LIBC is defined
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>

diff --git a/extras/mini-os/include/posix/sys/select.h b/extras/mini-os/include/posix/sys/select.h
index a9337be..5132c51 100644
--- a/extras/mini-os/include/posix/sys/select.h
+++ b/extras/mini-os/include/posix/sys/select.h
@@ -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 */
diff --git a/extras/mini-os/include/sys/time.h b/extras/mini-os/include/sys/time.h
index d6623a4..3be3653 100644
--- a/extras/mini-os/include/sys/time.h
+++ b/extras/mini-os/include/sys/time.h
@@ -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_ */
--
1.7.4.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
Re: [PATCH vtpm v3 06/12] add select definition to sys/time.h when HAVE_LIBC is defined [ In reply to ]
Matthew Fioravante, le Mon 08 Oct 2012 15:06:41 -0400, a écrit :
> 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>

> diff --git a/extras/mini-os/include/posix/sys/select.h b/extras/mini-os/include/posix/sys/select.h
> index a9337be..5132c51 100644
> --- a/extras/mini-os/include/posix/sys/select.h
> +++ b/extras/mini-os/include/posix/sys/select.h
> @@ -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 */
> diff --git a/extras/mini-os/include/sys/time.h b/extras/mini-os/include/sys/time.h
> index d6623a4..3be3653 100644
> --- a/extras/mini-os/include/sys/time.h
> +++ b/extras/mini-os/include/sys/time.h
> @@ -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_ */
> --
> 1.7.4.4
>

--
Samuel
<i> ben oui ce serait idiot, mais osb
-+- m'en fous de faire un truc débile ! -+-

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
Re: [PATCH vtpm v3 06/12] add select definition to sys/time.h when HAVE_LIBC is defined [ In reply to ]
On Mon, 2012-10-08 at 23:33 +0100, Samuel Thibault wrote:
> Matthew Fioravante, le Mon 08 Oct 2012 15:06:41 -0400, a écrit :
> > 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>

and applied, thanks.

>
> > diff --git a/extras/mini-os/include/posix/sys/select.h b/extras/mini-os/include/posix/sys/select.h
> > index a9337be..5132c51 100644
> > --- a/extras/mini-os/include/posix/sys/select.h
> > +++ b/extras/mini-os/include/posix/sys/select.h
> > @@ -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 */
> > diff --git a/extras/mini-os/include/sys/time.h b/extras/mini-os/include/sys/time.h
> > index d6623a4..3be3653 100644
> > --- a/extras/mini-os/include/sys/time.h
> > +++ b/extras/mini-os/include/sys/time.h
> > @@ -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_ */
> > --
> > 1.7.4.4
> >
>



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel