From abd7abd13e97ad10eb86ec9ff7c225968e4710d3 Mon Sep 17 00:00:00 2001 From: Alexey Vasiliev Date: Fri, 1 Feb 2019 17:33:33 +0200 Subject: [PATCH] trying to fix build for 0.4.0 --- ext/webp_ffi/webp_ffi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/webp_ffi/webp_ffi.c b/ext/webp_ffi/webp_ffi.c index 50b9e58..f269744 100644 --- a/ext/webp_ffi/webp_ffi.c +++ b/ext/webp_ffi/webp_ffi.c @@ -65,7 +65,7 @@ int webp_encode(const char *in_file, const char *out_file, const FfiWebpEncodeCo config.lossless = encode_config->lossless; } -#ifdef __cplusplus +#if (ENC_MAJ_VERSION == 0 && ENC_MIN_VERSION > 4) || ENC_MAJ_VERSION > 0 if (encode_config->near_lossless >= 0 && encode_config->near_lossless <= 100){ config.near_lossless = encode_config->near_lossless; config.lossless = 1; // use near-lossless only with lossless