Message ID | 20190117114359.5164-28-marcandre.lureau@redhat.com |
---|---|
State | New |
Headers | show |
Series | slirp: make it again a standalone project (part 2) | expand |
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:59 +0400, a ecrit: > Make it possible to use headers easily with C++ projects. > > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Applied, thanks!
diff --git a/slirp/libslirp.h b/slirp/libslirp.h index 9b13d8250c6..fccab425187 100644 --- a/slirp/libslirp.h +++ b/slirp/libslirp.h @@ -12,6 +12,10 @@ #include <arpa/inet.h> #endif +#ifdef __cplusplus +extern "C" { +#endif + typedef struct Slirp Slirp; enum { @@ -96,5 +100,8 @@ void slirp_socket_recv(Slirp *slirp, struct in_addr guest_addr, int guest_port, const uint8_t *buf, int size); size_t slirp_socket_can_recv(Slirp *slirp, struct in_addr guest_addr, int guest_port); - +#ifdef __cplusplus +} /* extern "C" */ #endif + +#endif /* LIBSLIRP_H */
Make it possible to use headers easily with C++ projects. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> --- slirp/libslirp.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)