Просмотр исходного кода

Allow corotypes.h to be included from C++ code.

Michael van der Westhuizen 12 лет назад
Родитель
Сommit
298a993552
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      include/corosync/corotypes.h

+ 8 - 0
include/corosync/corotypes.h

@@ -41,6 +41,10 @@
 #include <time.h>
 #include <sys/time.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef int64_t cs_time_t;
 
 #define CS_FALSE 0
@@ -136,5 +140,9 @@ cs_error_t qb_to_cs_error (int result);
 const char * cs_strerror(cs_error_t err);
 cs_error_t hdb_error_to_cs (int res);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* COROTYPES_H_DEFINED */