From nobody Fri Nov 7 11:21:06 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548293870944974.4469763927265; Wed, 23 Jan 2019 17:37:50 -0800 (PST) Received: from localhost ([127.0.0.1]:44708 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmTxb-0004Yw-2g for importer@patchew.org; Wed, 23 Jan 2019 20:37:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmTwh-0004FZ-Rs for qemu-devel@nongnu.org; Wed, 23 Jan 2019 20:36:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmTwh-0005b7-38 for qemu-devel@nongnu.org; Wed, 23 Jan 2019 20:36:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60916) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gmTwd-0005Kk-Fl for qemu-devel@nongnu.org; Wed, 23 Jan 2019 20:36:42 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9115FA8F4; Thu, 24 Jan 2019 01:36:31 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-27.brq.redhat.com [10.40.204.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 50E5B6B8D6; Thu, 24 Jan 2019 01:36:27 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Thu, 24 Jan 2019 02:36:25 +0100 Message-Id: <20190124013625.27239-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 24 Jan 2019 01:36:31 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [RFC PATCH] ui/egl: Silent '__HAIKU__ undefined' warnings on OpenBSD 6.1 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: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Brad Smith Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" OpenBSD display various warnings about the use of an undefined __HAIKU__: CC ui/egl-context.o In file included from /usr/X11R6/include/epoxy/egl_generated.h:10:0, from /usr/X11R6/include/epoxy/egl.h:46, from include/ui/egl-helpers.h:5, from include/ui/egl-context.h:5, from ui/egl-context.c:3: /usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not d= efined [-Wundef] #elif __HAIKU__ ^ CC ui/egl-helpers.o /usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not def= ined [-Wundef] CC ui/egl-headless.o /usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not def= ined [-Wundef] This is due to a old : 70 #if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) &&= !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ ... 108 #elif defined(__unix__) || defined(__APPLE__) 128 #elif __HAIKU__ 134 #else 135 #error "Platform not recognized" 136 #endif Kludge this by adding a check to ./configure: if this warning occurs, define __HAIKU__ from the CFLAGS. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- This is ugly, hopefully someone can come with a clever idea :) configure | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/configure b/configure index 8f312ac3e2..7c7eee44da 100755 --- a/configure +++ b/configure @@ -4036,6 +4036,17 @@ EOF if compile_prog "" "" ; then opengl_dmabuf=3Dyes fi + cat > $TMPC << EOF +#include +int main(void) { return 0; } +EOF + if test "$targetos" =3D "OpenBSD" ; then + if ! compile_prog "-Wundef -Werror" "" ; then + if compile_prog "-Wundef -Werror -D__HAIKU__=3D0" "" ; then + QEMU_CFLAGS=3D"$QEMU_CFLAGS -D__HAIKU__=3D0" + fi + fi + fi fi =20 ########################################## --=20 2.20.1