]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Fix zstd_internal.h for C++ mode
authorNick Terrell <terrelln@fb.com>
Fri, 25 Aug 2017 01:09:50 +0000 (18:09 -0700)
committerNick Terrell <terrelln@fb.com>
Fri, 25 Aug 2017 01:09:50 +0000 (18:09 -0700)
lib/common/zstd_common.c
lib/common/zstd_internal.h

index 08384cabf59bbb35f823a3006d652bedd44d3a3c..1155c60c41ef5cfd54b9491287ae42d3c8045cbf 100644 (file)
@@ -15,8 +15,7 @@
 #include <stdlib.h>      /* malloc, calloc, free */
 #include <string.h>      /* memset */
 #include "error_private.h"
-#define ZSTD_STATIC_LINKING_ONLY
-#include "zstd.h"
+#include "zstd_internal.h"
 
 
 /*-****************************************
index ac1f3989683b035a3371acfbe1392744e8567381..fce75723a60402200d8ae6bb55c6dfc4aa430123 100644 (file)
 #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 */