diff --git a/src/failing-alloc.c b/src/failing-alloc.c index 1bf18cd67..1bfb935b9 100644 --- a/src/failing-alloc.c +++ b/src/failing-alloc.c @@ -25,6 +25,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + int alloc_state = 0; __attribute__((no_sanitize("integer"))) @@ -55,3 +59,7 @@ void hb_free_impl (void *ptr) { return free (ptr); } + +#ifdef __cplusplus +} +#endif