From patchwork Tue May 14 12:05:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 243691 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9D22B2C00C4 for ; Tue, 14 May 2013 22:06:03 +1000 (EST) Received: from localhost ([::1]:47917 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcDzV-00062f-Ow for incoming@patchwork.ozlabs.org; Tue, 14 May 2013 08:06:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58176) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcDz3-0005zq-6w for qemu-devel@nongnu.org; Tue, 14 May 2013 08:05:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UcDyz-0006ru-CT for qemu-devel@nongnu.org; Tue, 14 May 2013 08:05:33 -0400 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]:49595) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcDyz-0006rh-74 for qemu-devel@nongnu.org; Tue, 14 May 2013 08:05:29 -0400 Received: by mail-wi0-f172.google.com with SMTP id ey16so1924213wid.11 for ; Tue, 14 May 2013 05:05:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer; bh=G6DPQxr+Vy1DpxZs42w/c2T8A3nb8cPH0iLRtj32ODQ=; b=ygd1V6wPBWA3E0p/L/DBRQrsuWH7ap2Jlt8uYJepQ6hEFeiS8NCqzfrIdtmaG3OVyr 6fDXcDB52eTYnoWG1B8+6RapS+zTVGvCLXVt2hDzPWS037G5xWsSrhdQdVxjMKYVvav+ /gBK/YMpi+vNb62Pv6d14A5n3vGfmrxJGbcD/xhsqbqFD7dCRVG56DAIGT5zNxtNwtWX GyW06RU5w5zQa2gCO4I+DKVCDmYRhbuUFoBJIfVNLP/nOxB2Wm9YzKlGoeZtyi32VBQi LVcwKv6PsTjraoalHNbqYWl/JaChTPc/KGrbTDcvryRTG4+NyzvNb0COesgiCVuev8fb 4Y1A== X-Received: by 10.180.206.77 with SMTP id lm13mr5894456wic.18.1368533128249; Tue, 14 May 2013 05:05:28 -0700 (PDT) Received: from playground.lan (net-2-35-204-156.cust.dsl.vodafone.it. [2.35.204.156]) by mx.google.com with ESMTPSA id e8sm21344382wic.5.2013.05.14.05.05.26 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 14 May 2013 05:05:27 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 14 May 2013 14:05:21 +0200 Message-Id: <1368533121-30796-1-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.1.4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::22c Cc: brad@comstyle.com Subject: [Qemu-devel] [PATCH for-1.5] portability: pty.h is glibc-specific X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This should fix building the GTK+ front-end on BSDs. Signed-off-by: Paolo Bonzini --- include/qemu-common.h | 12 ++++++++++++ qemu-char.c | 10 ---------- ui/gtk.c | 1 - 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/include/qemu-common.h b/include/qemu-common.h index b399d85..af769f5 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -42,6 +42,18 @@ #include #include "glib-compat.h" +#if defined(__GLIBC__) +# include +#elif defined CONFIG_BSD +# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) +# include +# else +# include +# endif +#elif defined CONFIG_SOLARIS +# include +#endif + #ifdef _WIN32 #include "sysemu/os-win32.h" #endif diff --git a/qemu-char.c b/qemu-char.c index 64e824d..30a2ddf 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -53,13 +53,6 @@ #include #ifdef CONFIG_BSD #include -#if defined(__GLIBC__) -#include -#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) -#include -#else -#include -#endif #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #include #include @@ -69,8 +62,6 @@ #endif #else #ifdef __linux__ -#include - #include #include #endif @@ -87,7 +78,6 @@ #include #include #include -#include #endif #endif #endif diff --git a/ui/gtk.c b/ui/gtk.c index e12f228..7b2d2ac 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -55,7 +55,6 @@ #include #include #include -#include #include #include "ui/console.h"