diff --git a/c/detools.h b/c/detools.h index 1cc9c6f..5c50b00 100644 --- a/c/detools.h +++ b/c/detools.h @@ -29,6 +29,10 @@ #ifndef DETOOLS_H #define DETOOLS_H +#ifdef __cplusplus +extern "C" { +#endif + /* * Configuration. * @@ -629,4 +633,8 @@ int detools_apply_patch_in_place_filenames(const char *memory_p, */ const char *detools_error_as_string(int error); +#ifdef __cplusplus +} +#endif + #endif diff --git a/c/heatshrink/heatshrink_decoder.h b/c/heatshrink/heatshrink_decoder.h index bda8399..63211e4 100644 --- a/c/heatshrink/heatshrink_decoder.h +++ b/c/heatshrink/heatshrink_decoder.h @@ -1,6 +1,10 @@ #ifndef HEATSHRINK_DECODER_H #define HEATSHRINK_DECODER_H +#ifdef __cplusplus +extern "C" { +#endif + #include #include #include "heatshrink_common.h" @@ -97,4 +101,8 @@ HSD_poll_res heatshrink_decoder_poll(heatshrink_decoder *hsd, * call heatshrink_decoder_poll and repeat. */ HSD_finish_res heatshrink_decoder_finish(heatshrink_decoder *hsd); +#ifdef __cplusplus +} +#endif + #endif