From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Eric Blake" <eblake@redhat.com>,
"Brad Smith" <brad@comstyle.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [Qemu-devel] [RFC PATCH] ui/egl: Silent '__HAIKU__ undefined' warnings on OpenBSD 6.1
Date: Thu, 24 Jan 2019 02:36:25 +0100 [thread overview]
Message-ID: <20190124013625.27239-1-philmd@redhat.com> (raw)
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 defined [-Wundef]
#elif __HAIKU__
^
CC ui/egl-helpers.o
/usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]
CC ui/egl-headless.o
/usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]
This is due to a old <epoxy/egl_generated.h>:
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é <philmd@redhat.com>
---
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=yes
fi
+ cat > $TMPC << EOF
+#include <epoxy/egl.h>
+int main(void) { return 0; }
+EOF
+ if test "$targetos" = "OpenBSD" ; then
+ if ! compile_prog "-Wundef -Werror" "" ; then
+ if compile_prog "-Wundef -Werror -D__HAIKU__=0" "" ; then
+ QEMU_CFLAGS="$QEMU_CFLAGS -D__HAIKU__=0"
+ fi
+ fi
+ fi
fi
##########################################
--
2.20.1
next reply other threads:[~2019-01-24 1:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-24 1:36 Philippe Mathieu-Daudé [this message]
2019-01-24 2:00 ` [Qemu-devel] [RFC PATCH] ui/egl: Silent '__HAIKU__ undefined' warnings on OpenBSD 6.1 Kamil Rytarowski
2019-01-24 10:39 ` Philippe Mathieu-Daudé
2019-01-24 2:03 ` Brad Smith
2019-01-24 10:11 ` Peter Maydell
2019-01-24 10:38 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190124013625.27239-1-philmd@redhat.com \
--to=philmd@redhat.com \
--cc=brad@comstyle.com \
--cc=eblake@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).