Hi!

On 25/06/2020 23.30, David CARLIER wrote:
 From 78706a28c6aa8b5e522b5781588b38961d79d6f6 Mon Sep 17 00:00:00 2001
From: David Carlier <devne...@gmail.com>
Date: Thu, 25 Jun 2020 19:32:42 +0000
Subject: [PATCH] build: haiku system build fix

The above header lines should not be part of the e-mail body (otherwise they will show up in the commit message if the patch gets applied with "git am").

Most of missing features resides in the bsd library.
Also defining constant equivalence.

Signed-off-by: David Carlier <devne...@gmail.com>
---
  configure            | 34 ++++++++++++++++++++++++++++++++--
  include/qemu/bswap.h |  2 ++
  include/qemu/osdep.h |  4 ++++
  os-posix.c           |  4 ++++
  util/Makefile.objs   |  2 +-
  util/compatfd.c      |  2 ++
  util/main-loop.c     |  1 +
  util/oslib-posix.c   | 20 ++++++++++++++++++++
  util/qemu-openpty.c  |  2 +-
  9 files changed, 67 insertions(+), 4 deletions(-)

diff --git a/configure b/configure
index ba88fd1824..43baeadf31 100755
--- a/configure
+++ b/configure
@@ -901,8 +901,8 @@ SunOS)
  ;;
  Haiku)
    haiku="yes"
-  QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS $QEMU_CFLAGS"
-  LIBS="-lposix_error_mapper -lnetwork $LIBS"
+  QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS -D_BSD_SOURCE $QEMU_CFLAGS"
+  LIBS="-lposix_error_mapper -lnetwork -lbsd $LIBS"
  ;;
  Linux)
    audio_drv_list="try-pa oss"
@@ -2373,6 +2373,30 @@ else
    l2tpv3=no
  fi

+cat > $TMPC <<EOF
+#include <pty.h>
+int main(int argc, char *argv[]) {
+    return 0;
+}
+EOF

Please use the check_include function if you just want to test the availability of a header.

+if compile_prog "" "" ; then
+  pty_h=yes
+else
+  pty_h=no
+fi

 Thanks,
  Thomas


Reply via email to