From 3fcc9a3c83c807792846ae2c9f98aeb447e62805 Mon Sep 17 00:00:00 2001 From: iphydf Date: Sat, 3 Feb 2018 15:44:43 +0000 Subject: Add some unit tests for util.h. --- toxcore/util.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'toxcore/util.h') diff --git a/toxcore/util.h b/toxcore/util.h index 8777e191..8c86158b 100644 --- a/toxcore/util.h +++ b/toxcore/util.h @@ -32,6 +32,10 @@ #include "logger.h" +#ifdef __cplusplus +extern "C" { +#endif + #define MIN(a,b) (((a)<(b))?(a):(b)) #define PAIR(TYPE1__, TYPE2__) struct { TYPE1__ first; TYPE2__ second; } @@ -61,4 +65,8 @@ int load_state(load_state_callback_func load_state_callback, Logger *log, void * /* Returns -1 if failed or 0 if success */ int create_recursive_mutex(pthread_mutex_t *mutex); +#ifdef __cplusplus +} // extern "C" +#endif + #endif /* UTIL_H */ -- cgit v1.2.3