diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2011-04-19 22:58:36 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2012-03-20 15:25:51 +0100 |
commit | c15c5050afa972a8918427e213a2500b44328b85 (patch) | |
tree | 9502f025eb55001f35c10576712e4f3f28f9ebe7 /common/lz_common.h | |
parent | 5b0b6d2f8431f55394b0766f0cbe5c26f89fd6cd (diff) | |
download | spice-common-c15c5050afa972a8918427e213a2500b44328b85.tar.gz spice-common-c15c5050afa972a8918427e213a2500b44328b85.tar.xz spice-common-c15c5050afa972a8918427e213a2500b44328b85.zip |
common: add extern "C" guards to headers
Since some spice C++ code is using code from common/, the C
functions need to be marked as such for the C++ compiler, otherwise
we'll get linkage issues.
Diffstat (limited to 'common/lz_common.h')
-rw-r--r-- | common/lz_common.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/lz_common.h b/common/lz_common.h index 34276af..4156cff 100644 --- a/common/lz_common.h +++ b/common/lz_common.h @@ -23,6 +23,10 @@ #ifndef _LZ_COMMON_H #define _LZ_COMMON_H +#ifdef __cplusplus +extern "C" { +#endif + //#define DEBUG /* change the max window size will require change in the encoding format*/ @@ -58,5 +62,8 @@ static const int RGB_BYTES_PER_PIXEL[] = {0, 1, 1, 1, 1, 1, 2, 3, 4, 4, 4}; #define LZ_VERSION_MINOR 1U #define LZ_VERSION ((LZ_VERSION_MAJOR << 16) | (LZ_VERSION_MINOR & 0xffff)) +#ifdef __cplusplus +} +#endif #endif // _LZ_COMMON_H |