From 2a65f0e1857fccd4427eed733a49d8a4c2f67856 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 22 Apr 2013 09:17:06 +0200 Subject: Make jdiv_round_up available (-Werror=implicit-function-declaration) ...apparently caused by 845456565db945ffd2a1551ab86446fcd1717021 "DO NOT use internal headers of jpeg." The warning there "I am not sure if it is all right to include parts of jpeg directly into our code" still holds, of course. Change-Id: I4754dbcd9b2c3eafc64d32c3b83faa53cf913abd --- vcl/source/filter/jpeg/transupp.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'vcl/source') diff --git a/vcl/source/filter/jpeg/transupp.c b/vcl/source/filter/jpeg/transupp.c index 500b0a2a62f7..a1c341668541 100644 --- a/vcl/source/filter/jpeg/transupp.c +++ b/vcl/source/filter/jpeg/transupp.c @@ -21,6 +21,16 @@ #include "jpegcomp.h" #include /* to declare isdigit() */ +/* Definition of jdiv_round_up is copied here from jutils.c in jpeg-8c.tar.gz, + just as the rest of this file appears to be copied here from transupp.c in + jpeg-8c.tar.gz: */ +static long +jdiv_round_up (long a, long b) +/* Compute a/b rounded up to next integer, ie, ceil(a/b) */ +/* Assumes a >= 0, b > 0 */ +{ + return (a + b - 1L) / b; +} #if JPEG_LIB_VERSION >= 70 #define dstinfo_min_DCT_h_scaled_size dstinfo->min_DCT_h_scaled_size -- cgit