diff --git a/include/ucore/rate_limit.h b/include/ucore/rate_limit.h index fedfd55..7d39755 100644 --- a/include/ucore/rate_limit.h +++ b/include/ucore/rate_limit.h @@ -46,6 +46,11 @@ * } * } */ + +#ifdef __cplusplus +extern "C" { +#endif + struct RateLimit { //how many tickets we want long tickets; @@ -102,5 +107,9 @@ void uc_ratelimit_reset(struct RateLimit *r, long current_ts); */ int uc_ratelimit_allow(struct RateLimit *r, long current_ts); +#ifdef __cplusplus +} +#endif + #endif