diff --git a/lib/common/zstd_common.c b/lib/common/zstd_common.c index 08384cab..1155c60c 100644 --- a/lib/common/zstd_common.c +++ b/lib/common/zstd_common.c @@ -15,8 +15,7 @@ #include /* malloc, calloc, free */ #include /* memset */ #include "error_private.h" -#define ZSTD_STATIC_LINKING_ONLY -#include "zstd.h" +#include "zstd_internal.h" /*-**************************************** diff --git a/lib/common/zstd_internal.h b/lib/common/zstd_internal.h index ac1f3989..fce75723 100644 --- a/lib/common/zstd_internal.h +++ b/lib/common/zstd_internal.h @@ -29,6 +29,11 @@ #include "xxhash.h" /* XXH_reset, update, digest */ +#if defined (__cplusplus) +extern "C" { +#endif + + /*-************************************* * Debug ***************************************/ @@ -334,5 +339,8 @@ typedef struct { size_t ZSTD_getcBlockSize(const void* src, size_t srcSize, blockProperties_t* bpPtr); +#if defined (__cplusplus) +} +#endif #endif /* ZSTD_CCOMMON_H_MODULE */