[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 31/31] slirp: API is extern C
From: |
Samuel Thibault |
Subject: |
[Qemu-devel] [PULL 31/31] slirp: API is extern C |
Date: |
Sun, 27 Jan 2019 13:05:26 +0100 |
From: Marc-André Lureau <address@hidden>
Make it possible to use headers easily with C++ projects.
Signed-off-by: Marc-André Lureau <address@hidden>
Signed-off-by: Samuel Thibault <address@hidden>
---
slirp/libslirp.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
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 */
--
2.20.1
- [Qemu-devel] [PULL 13/31] slirp: add unregister_poll_fd() callback, (continued)
- [Qemu-devel] [PULL 13/31] slirp: add unregister_poll_fd() callback, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 28/31] slirp: remove slirp_instances list, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 10/31] slirp: replace QEMU_PACKED with SLIRP_PACKED, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 12/31] slirp: replace qemu_set_nonblock(), Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 17/31] slirp: improve windows headers inclusion, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 15/31] slirp: move QEMU state saving to a separate unit, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 18/31] slirp: add slirp own version of pstrcpy, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 21/31] slirp: replace net/eth.h inclusion with own defines, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 11/31] slirp: replace most qemu socket utilities with slirp own version, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 20/31] slirp: remove now useless QEMU headers inclusions, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 31/31] slirp: API is extern C,
Samuel Thibault <=
- [Qemu-devel] [PULL 29/31] slirp: use polling callbacks, drop glib requirement, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 30/31] slirp: pass opaque to all callbacks, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 27/31] slirp: replace global polling with per-instance & notifier, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 24/31] slirp: replace remaining qemu headers dependency, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 22/31] slirp: replace qemu qtailq with slirp own copy, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 25/31] slirp: prefer c99 types over BSD kind, Samuel Thibault, 2019/01/27
- [Qemu-devel] [PULL 26/31] slirp: improve send_packet() callback, Samuel Thibault, 2019/01/27
- Re: [Qemu-devel] [PULL 00/31] More work towards libslirp, Peter Maydell, 2019/01/28
- Re: [Qemu-devel] [PULL 00/31] More work towards libslirp, no-reply, 2019/01/31