diff --git a/reliable_multicast.h b/reliable_multicast.h index beeafec..4ddd2a2 100644 --- a/reliable_multicast.h +++ b/reliable_multicast.h @@ -7,6 +7,11 @@ #ifndef __RELIABLE_MULTICAST_H__ #define __RELIABLE_MULTICAST_H__ + +#ifdef __cplusplus +extern "C" { +#endif + #include #include #include "rmc_list.h" @@ -433,4 +438,9 @@ extern payload_len_t rmc_sub_packet_payload_len(struct sub_packet* pack); // Data was sent on TCP connection. #define RMC_WRITE_TCP 10 + +#ifdef __cplusplus +} +#endif + #endif // __RELIABLE_MULTICAST_H__ diff --git a/rmc_log.h b/rmc_log.h index fed70ee..c4af711 100644 --- a/rmc_log.h +++ b/rmc_log.h @@ -11,6 +11,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + #define RMC_LOG_LEVEL_NONE 0 #define RMC_LOG_LEVEL_FATAL 1 #define RMC_LOG_LEVEL_ERROR 2 @@ -54,4 +58,8 @@ extern int _rmc_log_level; #define RMC_LOG_INDEX_ERROR(index, fmt, ...) { if (_rmc_log_level >= RMC_LOG_LEVEL_ERROR) rmc_log(RMC_LOG_LEVEL_ERROR, __FUNCTION__, __FILE__, __LINE__, index, fmt, ##__VA_ARGS__); } #define RMC_LOG_INDEX_FATAL(index, fmt, ...) { if (_rmc_log_level >= RMC_LOG_LEVEL_FATAL) rmc_log(RMC_LOG_LEVEL_FATAL, __FUNCTION__, __FILE__, __LINE__, index, fmt, ##__VA_ARGS__); } +#ifdef __cplusplus +} +#endif + #endif // __RMC_LOG_H__