From patchwork Thu Oct 11 15:30:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 10636939 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5288414DB for ; Thu, 11 Oct 2018 15:31:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 673E02BA80 for ; Thu, 11 Oct 2018 15:31:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6548E2BBD3; Thu, 11 Oct 2018 15:31:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F17A62BA80 for ; Thu, 11 Oct 2018 15:31:54 +0000 (UTC) Received: from localhost ([::1]:35141 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAcwM-0007vi-AM for patchwork-qemu-devel@patchwork.kernel.org; Thu, 11 Oct 2018 11:31:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAcvY-0007cy-PX for qemu-devel@nongnu.org; Thu, 11 Oct 2018 11:31:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAcvU-0006u2-Gw for qemu-devel@nongnu.org; Thu, 11 Oct 2018 11:31:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32531) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gAcvU-0006tg-Ac for qemu-devel@nongnu.org; Thu, 11 Oct 2018 11:31:00 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6BA9A31524C9; Thu, 11 Oct 2018 15:30:59 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-117-183.ams2.redhat.com [10.36.117.183]) by smtp.corp.redhat.com (Postfix) with ESMTP id 243891001F40; Thu, 11 Oct 2018 15:30:57 +0000 (UTC) From: Kevin Wolf To: qemu-devel@nongnu.org Date: Thu, 11 Oct 2018 17:30:39 +0200 Message-Id: <20181011153039.2324-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Thu, 11 Oct 2018 15:30:59 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] gtk: Don't vte_terminal_set_encoding() on new VTE versions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, kbastian@mail.uni-paderborn.de, kraxel@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The function vte_terminal_set_encoding() is deprecated since VTE 0.54, so stop calling it from that version on. This fixes a build error because of our use of warning flags [-Werror=deprecated-declarations]. Fixes: https://bugs.launchpad.net/bugs/1794939 Reported-by: Bastian Koppelmann Signed-off-by: Kevin Wolf --- ui/gtk.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 3ddb5fe162..1d68276253 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1951,12 +1951,14 @@ static GSList *gd_vc_vte_init(GtkDisplayState *s, VirtualConsole *vc, g_signal_connect(vc->vte.terminal, "commit", G_CALLBACK(gd_vc_in), vc); /* The documentation says that the default is UTF-8, but actually it is - * 7-bit ASCII at least in VTE 0.38. - */ + * 7-bit ASCII at least in VTE 0.38. The function is deprecated since + * VTE 0.54 (only UTF-8 is supported now). */ +#if !VTE_CHECK_VERSION(0, 54, 0) #if VTE_CHECK_VERSION(0, 38, 0) vte_terminal_set_encoding(VTE_TERMINAL(vc->vte.terminal), "UTF-8", NULL); #else vte_terminal_set_encoding(VTE_TERMINAL(vc->vte.terminal), "UTF-8"); +#endif #endif vte_terminal_set_scrollback_lines(VTE_TERMINAL(vc->vte.terminal), -1);