From 760e113414e487647e517c4489f34e9c37130bdd Mon Sep 17 00:00:00 2001 From: Rustam Gamidov Date: Tue, 24 Mar 2020 22:00:50 +0200 Subject: [PATCH] general helpers: wrap code with extern C --- common/general.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/common/general.h b/common/general.h index c9253267..3458e47f 100644 --- a/common/general.h +++ b/common/general.h @@ -1,9 +1,17 @@ #ifndef H_COMMON_GENERAL #define H_COMMON_GENERAL -int max(int first, int second) +#ifdef __cplusplus +extern "C" { +#endif + +inline int max(int first, int second) { return (first < second) ? second : first; } +#ifdef __cplusplus +} +#endif + #endif