diff --git a/build_tools/fbcode.gcc481.sh b/build_tools/fbcode.gcc481.sh index 556d15af2..d02596f05 100644 --- a/build_tools/fbcode.gcc481.sh +++ b/build_tools/fbcode.gcc481.sh @@ -44,8 +44,8 @@ BZIP_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/bzip2/bzip2-1.0.6/c3f970a/include" BZIP_LIBS=" $TOOLCHAIN_LIB_BASE/bzip2/bzip2-1.0.6/c3f970a/lib/libbz2.a" LZ4_REV=065ec7e38fe83329031f6668c43bef83eff5808b -LZ4_INCLUDE=" -I /mnt/gvfs/third-party2/lz4/$LZ4_REV/r117/gcc-4.8.1-glibc-2.17/c3f970a/include" -LZ4_LIBS=" /mnt/gvfs/third-party2/lz4/$LZ4_REV/r117/gcc-4.8.1-glibc-2.17/c3f970a/lib/liblz4.a" +LZ4_INCLUDE=" -I /mnt/gvfs/third-party2/lz4/$LZ4_REV/r108/gcc-4.8.1-glibc-2.17/c3f970a/include" +LZ4_LIBS=" /mnt/gvfs/third-party2/lz4/$LZ4_REV/r108/gcc-4.8.1-glibc-2.17/c3f970a/lib/liblz4.a" # location of gflags headers and libraries GFLAGS_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/gflags/gflags-1.6/c3f970a/include" diff --git a/port/port_posix.h b/port/port_posix.h index b2d162468..d20a5dff2 100644 --- a/port/port_posix.h +++ b/port/port_posix.h @@ -465,8 +465,12 @@ inline bool LZ4HC_Compress(const CompressionOptions &opts, const char* input, char *p = const_cast(output->c_str()); memcpy(p, &length, sizeof(length)); size_t outlen; +#ifdef LZ4_VERSION_MAJOR // they only started defining this since r113 outlen = LZ4_compressHC2_limitedOutput(input, p + 8, length, compressBound, opts.level); +#else + outlen = LZ4_compressHC_limitedOutput(input, p + 8, length, compressBound); +#endif if (outlen == 0) { return false; }