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

Re: [Minios-devel] [UNIKRAFT/LIBLWIP PATCH v2 2/2] Make headers compatible with c++ builds


  • To: "minios-devel@xxxxxxxxxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
  • Date: Tue, 10 Dec 2019 23:02:35 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=stud.acs.upb.ro; dmarc=pass action=none header.from=stud.acs.upb.ro; dkim=pass header.d=stud.acs.upb.ro; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YTiv6ZnGQy5XJlyOtsberC6W3m+3qeo/ODTKSWLm22A=; b=ATVMCebWNroRQSeGcDlm5AS4NeHBoh0BxG5VJo5Bphw9/W0u3W9SIZ6QoBF42VmtbJ7iaC/yyJEDooFoyoA60r5VT0Q/ujT3a3KHa40bUfvlc9Y/beGA0I5pheiRs1wkR3dZ95fLjcwATL/YBBUz7PwaDSvVoc2MoZsIe/BET/SMbms4h5mm+F9z0oAQbpXnbXYV3iHHcG4szkCVvKH6W9f1mPifPAkWGwPpdlucIToQYZaLsq/EB6lWwo2Qu6Oi7QIw67P17ilt1G2eKFolP+S9Y9PTVNyhk1MPuZfIg3+PyKm2VLllnNqNfk9fIX2v+GqxWZ+Q01uCRSMJ8MgU9w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fzP0Ttiv7E1ZZLQFD0YMy4CwYjTxr8MyB+0mmWZHi3OKVnVDkbUDDtDAUu/EiTewM4VwPnqiGe5p4O4l0AN4/QmQKyUX25V287etym2SqRpE3AawGaOg5FEDjrCMG09fs19HgFnb1jcAATaHyO4mdw9eBdrHt/9UUMX6O81/l8XkRKoEcyZWAPkYe/WQJSc4aFpMDHkSREp8iWjHKFJm9Ktr8WpnvCm+dc765NngnQ4j0YP1bNEVoOWhTx9CvAIFuoiDKQqp5gwBn1uLw2K9mpdQRSTxhxulhx/2GRQOOEpRFU6v4ECefGekyUjnlDW9oqAIs8cnzRrIvjc1hSttYA==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=vlad_andrei.badoiu@xxxxxxxxxxxxxxx;
  • Delivery-date: Tue, 10 Dec 2019 23:02:40 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Thread-index: AQHVrmlratBJF9y5JEqlZMzu/cqOkKez/v0A
  • Thread-topic: [Minios-devel] [UNIKRAFT/LIBLWIP PATCH v2 2/2] Make headers compatible with c++ builds

This looks great!

Thanks,

Vlad

Reviewed-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>

On 09.12.2019 10:19, Felipe Huici wrote:
> Add extern C clauses to header files so that c++ builds do not break.
>
> Signed-off-by: Felipe Huici <felipe.huici@xxxxxxxxx>
> ---
>   include/arpa/inet.h  | 7 +++++++
>   include/netdb.h      | 9 +++++++++
>   include/sys/socket.h | 8 ++++++++
>   3 files changed, 24 insertions(+)
>
> diff --git a/include/arpa/inet.h b/include/arpa/inet.h
> index a1201a2..c4d01d6 100644
> --- a/include/arpa/inet.h
> +++ b/include/arpa/inet.h
> @@ -1,5 +1,12 @@
>   #include <compat/posix/arpa/inet.h>
>   
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
>   const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
>   int inet_pton(int af, const char *src, void *dst);
>   
> +#ifdef __cplusplus
> +}
> +#endif
> diff --git a/include/netdb.h b/include/netdb.h
> index 5bbd354..6cca969 100644
> --- a/include/netdb.h
> +++ b/include/netdb.h
> @@ -2,6 +2,10 @@
>   #define _LWIP_GLUE_NETDB_H_
>   #include <compat/posix/netdb.h>
>   
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
>   #if LWIP_DNS && LWIP_SOCKET
>   
>   #if !(LWIP_COMPAT_SOCKETS)
> @@ -81,5 +85,10 @@ struct servent *getservbyname(const char *name, const char 
> *proto);
>   struct servent *getservbyport(int port, const char *proto);
>   int getservbyport_r(int port, const char *prots, struct servent *se,
>                   char *buf, size_t buflen, struct servent **res);
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
>   #endif
>   
> diff --git a/include/sys/socket.h b/include/sys/socket.h
> index f23ad32..090183a 100644
> --- a/include/sys/socket.h
> +++ b/include/sys/socket.h
> @@ -33,6 +33,10 @@
>   
>   #ifndef _UK_LWIP_SOCKET_H_
>   
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
>   #include <uk/config.h>
>   #if CONFIG_HAVE_LIBC
>   #include <fcntl.h>
> @@ -89,4 +93,8 @@ int sendto(int s, const void *dataptr, size_t size, int 
> flags,
>          const struct sockaddr *to, socklen_t tolen);
>   int socketpair(int domain, int type, int protocol, int sv[2]);
>   
> +#ifdef __cplusplus
> +}
> +#endif
> +
>   #endif /* _UK_LWIP_SOCKET_H_ */
_______________________________________________
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®.