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>
This commit is contained in:
parent
3e0fad3aa5
commit
ee261c0233
@ -12,6 +12,10 @@
|
|||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct Slirp Slirp;
|
typedef struct Slirp Slirp;
|
||||||
|
|
||||||
enum {
|
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);
|
int guest_port, const uint8_t *buf, int size);
|
||||||
size_t slirp_socket_can_recv(Slirp *slirp, struct in_addr guest_addr,
|
size_t slirp_socket_can_recv(Slirp *slirp, struct in_addr guest_addr,
|
||||||
int guest_port);
|
int guest_port);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* LIBSLIRP_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user