[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 27/27] slirp: API is extern C
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PATCH 27/27] slirp: API is extern C |
Date: |
Thu, 17 Jan 2019 15:43:59 +0400 |
Make it possible to use headers easily with C++ projects.
Signed-off-by: Marc-André Lureau <address@hidden>
---
slirp/libslirp.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
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 */
--
2.20.1.98.gecbdaf0899
- Re: [Qemu-devel] [PATCH 21/27] slirp: prefer c99 types over BSD kind, (continued)
- [Qemu-devel] [PATCH 24/27] slirp: remove slirp_instances list, Marc-André Lureau, 2019/01/17
- [Qemu-devel] [PATCH 23/27] slirp: replace global polling with per-instance & notifier, Marc-André Lureau, 2019/01/17
- [Qemu-devel] [PATCH 25/27] slirp: use polling callbacks, drop glib requirement, Marc-André Lureau, 2019/01/17
- [Qemu-devel] [PATCH 26/27] slirp: pass opaque to all callbacks, Marc-André Lureau, 2019/01/17
- [Qemu-devel] [PATCH 27/27] slirp: API is extern C,
Marc-André Lureau <=
- Re: [Qemu-devel] [PATCH 00/27] slirp: make it again a standalone project (part 2), Samuel Thibault, 2019/01/17
- Re: [Qemu-devel] [PATCH 00/27] slirp: make it again a standalone project (part 2), no-reply, 2019/01/31