diff --git a/ports/win32/pcapif.h b/ports/win32/pcapif.h index 736fbc8..534d9d5 100644 --- a/ports/win32/pcapif.h +++ b/ports/win32/pcapif.h @@ -1,6 +1,10 @@ #ifndef __PCAPIF_H__ #define __PCAPIF_H__ +#ifdef __cplusplus +extern "C" { +#endif + #include "lwip/err.h" /** Set to 1 to let rx use an own thread (only for NO_SYS==0). @@ -21,4 +25,8 @@ void pcapif_shutdown(struct netif *netif); void pcapif_poll (struct netif *netif); #endif /* !PCAPIF_RX_USE_THREAD */ +#ifdef __cplusplus +} #endif + +#endif /* __PCAPIF_H__ */ diff --git a/ports/win32/pcapif_helper.h b/ports/win32/pcapif_helper.h index 9fc69ff..abb2894 100644 --- a/ports/win32/pcapif_helper.h +++ b/ports/win32/pcapif_helper.h @@ -1,6 +1,9 @@ #ifndef __PCAPIF_HELPER_H__ #define __PCAPIF_HELPER_H__ +#ifdef __cplusplus +extern "C" { +#endif struct pcapifh_linkstate; @@ -15,4 +18,8 @@ enum pcapifh_link_event pcapifh_linkstate_get(struct pcapifh_linkstate* state); void pcapifh_linkstate_close(struct pcapifh_linkstate* state); +#ifdef __cplusplus +} +#endif + #endif /* __PCAPIF_HELPER_H__ */ \ No newline at end of file diff --git a/ports/win32/test.c b/ports/win32/test.c index b765071..3f26431 100644 --- a/ports/win32/test.c +++ b/ports/win32/test.c @@ -158,7 +158,7 @@ pppLinkStatusCallback(void *ctx, int errCode, void *arg) switch(errCode) { case PPPERR_NONE: { /* No error. */ - struct ppp_addrs *ppp_addrs = arg; + struct ppp_addrs *ppp_addrs = (struct ppp_addrs *)arg; printf("pppLinkStatusCallback: PPPERR_NONE\n"); printf(" our_ipaddr=%s\n", ip_ntoa(&ppp_addrs->our_ipaddr));