[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT/LIBLWIP] Fix compile error when enabling Operation mode (Mainloop (non-threaded).



Hi Simon, sounds good, I've just sent a v2.

-- Felipe

On Fri, Feb 14, 2020 at 1:47 PM Simon Kuenzer <simon.kuenzer@xxxxxxxxx> wrote:
>
> Hi Felipe,
>
> thanks a lot for this work. Besides these changes, I think part of the
> patch should also be a fix in include/netdb.h: Move getnameinfo()
> prototype into
> `#if LWIP_DNS && LWIP_SOCKET` condition at the beginning of the file
> (after freeaddrinfo()). What do you think?
>
> Thanks,
>
> Simon
>
> On 14.02.20 11:03, Felipe Huici wrote:
> > Enabling operating mode non-threaded (aka CONFIG_LWIP_NOTHREADS)
> > disables the socket API from lwip. This commit makes it so that our
> > socket-related glue code isn't added to the build if this option is
> > enabled.
> >
> > Signed-off-by: Felipe Huici <felipe.huici@xxxxxxxxx>
> > ---
> >   Makefile.uk          | 2 +-
> >   include/sys/socket.h | 3 +++
> >   2 files changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/Makefile.uk b/Makefile.uk
> > index 56ebcfc..5054ef4 100644
> > --- a/Makefile.uk
> > +++ b/Makefile.uk
> > @@ -80,6 +80,7 @@ LIBLWIP_SRCS-y += $(LIBLWIP_BASE)/proto.c
> >   LIBLWIP_SRCS-y += $(LIBLWIP_BASE)/host.c
> >   LIBLWIP_SRCS-y += $(LIBLWIP_BASE)/serv.c
> >   LIBLWIP_SRCS-y += $(LIBLWIP_BASE)/inet.c|unikraft
> > +LIBLWIP_SRCS-$(CONFIG_LWIP_DNS) += $(LIBLWIP_BASE)/getnameinfo.c|unikraft
> >   endif
> >   LIBLWIP_SRCS-$(CONFIG_LWIP_THREADS) += $(LIBLWIP_BASE)/mutex.c|unikraft
> >   LIBLWIP_SRCS-$(CONFIG_LWIP_THREADS) += 
> > $(LIBLWIP_BASE)/semaphore.c|unikraft
> > @@ -91,7 +92,6 @@ LIBLWIP_SRCS-y += $(LIBLWIP_BASE)/time.c|unikraft
> >   LIBLWIP_SRCS-y += $(LIBLWIP_BASE)/sendfile.c|unikraft
> >   LIBLWIP_SRCS-$(CONFIG_LWIP_SOCKET) += $(LIBLWIP_BASE)/sockets.c|unikraft
> >   LIBLWIP_SOCKETS_FLAGS-y += -Wno-cast-function-type
> > -LIBLWIP_SRCS-$(CONFIG_LWIP_DNS) += $(LIBLWIP_BASE)/getnameinfo.c|unikraft
> >   LIBLWIP_SRCS-y += $(LIBLWIP_EXTRACTED)/core/init.c
> >   LIBLWIP_SRCS-y += $(LIBLWIP_EXTRACTED)/core/def.c
> >   LIBLWIP_SRCS-y += $(LIBLWIP_EXTRACTED)/core/inet_chksum.c
> > diff --git a/include/sys/socket.h b/include/sys/socket.h
> > index 8007cb8..d52cf94 100644
> > --- a/include/sys/socket.h
> > +++ b/include/sys/socket.h
> > @@ -38,6 +38,8 @@ extern "C" {
> >   #endif
> >
> >   #include <uk/config.h>
> > +
> > +#if CONFIG_LWIP_SOCKETS
> >   #if CONFIG_HAVE_LIBC
> >   #include <fcntl.h>
> >   #include <poll.h>
> > @@ -104,5 +106,6 @@ int socketpair(int domain, int type, int protocol, int 
> > sv[2]);
> >   #ifdef __cplusplus
> >   }
> >   #endif
> > +#endif /* CONFIG_LWIP_SOCKETS */
> >
> >   #endif /* _UK_LWIP_SOCKET_H_ */
> >
>
> _______________________________________________
> Minios-devel mailing list
> Minios-devel@xxxxxxxxxxxxxxxxxxxx
> https://lists.xenproject.org/mailman/listinfo/minios-devel

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.