aboutsummaryrefslogtreecommitdiff
path: root/slirp
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2019-01-17 15:43:59 +0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-02-07 15:49:08 +0200
commitee261c02332ea856352f250b295a8ecd1eeb748e (patch)
tree14d441c400c8782da65a7f9531fc4b1ba52ebc66 /slirp
parent3e0fad3aa5f9f36566ac2815a54288d214e58689 (diff)
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>
Diffstat (limited to 'slirp')
-rw-r--r--slirp/libslirp.h9
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 */