From patchwork Mon Feb 28 10:48:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 84779 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 22E5C1007D2 for ; Mon, 28 Feb 2011 21:55:10 +1100 (EST) Received: from localhost ([127.0.0.1]:54887 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pu0ks-00033S-Vm for incoming@patchwork.ozlabs.org; Mon, 28 Feb 2011 05:55:07 -0500 Received: from [140.186.70.92] (port=38635 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pu0fe-000111-LG for qemu-devel@nongnu.org; Mon, 28 Feb 2011 05:49:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pu0fd-0008HZ-BH for qemu-devel@nongnu.org; Mon, 28 Feb 2011 05:49:42 -0500 Received: from ozlabs.org ([203.10.76.45]:54692) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pu0fc-0008G2-Qg for qemu-devel@nongnu.org; Mon, 28 Feb 2011 05:49:41 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3B82C1007D2; Mon, 28 Feb 2011 21:49:37 +1100 (EST) Date: Mon, 28 Feb 2011 21:48:41 +1100 From: David Gibson To: qemu-devel@nongnu.org Message-ID: <20110228104841.GD10873@yookeroo> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 203.10.76.45 Subject: [Qemu-devel] Fix build errors introduced by vnc jpeg changes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The recent changes to handling of jpegs over tight vnc connections cause build errors if qemu is configured with --disable-vnc-jpeg. The patch below corrects the errors, by adding some left out #ifdefs. Please apply. Signed-off-by: David Gibson --- ui/vnc-enc-tight.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c index 5933394..2522936 100644 --- a/ui/vnc-enc-tight.c +++ b/ui/vnc-enc-tight.c @@ -1536,8 +1536,10 @@ static int send_sub_rect(VncState *vs, int x, int y, int w, int h) uint32_t bg = 0, fg = 0; int colors; int ret = 0; +#ifdef CONFIG_VNC_JPEG bool force_jpeg = false; bool allow_jpeg = true; +#endif vnc_framebuffer_update(vs, x, y, w, h, vs->tight.type); @@ -1711,6 +1713,7 @@ static int tight_send_framebuffer_update(VncState *vs, int x, int y, vs->tight.pixel24 = false; } +#ifdef CONFIG_VNC_JPEG if (vs->tight.quality != (uint8_t)-1) { double freq = vnc_update_freq(vs, x, y, w, h); @@ -1718,6 +1721,7 @@ static int tight_send_framebuffer_update(VncState *vs, int x, int y, return send_rect_simple(vs, x, y, w, h, false); } } +#endif if (w * h < VNC_TIGHT_MIN_SPLIT_RECT_SIZE) { return send_rect_simple(vs, x, y, w, h, true);