diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2019-01-17 15:43:59 +0400 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-02-07 15:49:08 +0200 |
commit | ee261c02332ea856352f250b295a8ecd1eeb748e (patch) | |
tree | 14d441c400c8782da65a7f9531fc4b1ba52ebc66 | |
parent | 3e0fad3aa5f9f36566ac2815a54288d214e58689 (diff) | |
download | qemu-ee261c02332ea856352f250b295a8ecd1eeb748e.zip |
slirp: API is extern C
Make it possible to use headers easily with C++ projects.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-rw-r--r-- | slirp/libslirp.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/slirp/libslirp.h b/slirp/libslirp.h index 9b13d8250c..fccab42518 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 */ |