From patchwork Fri Jun 26 10:07:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David CARLIER X-Patchwork-Id: 11627029 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8F8C96C1 for ; Fri, 26 Jun 2020 10:08:40 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 65DD5206C0 for ; Fri, 26 Jun 2020 10:08:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="r/AUBLc9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 65DD5206C0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:42230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jolHj-0001uF-NA for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jun 2020 06:08:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jolH5-0000eR-OE; Fri, 26 Jun 2020 06:07:59 -0400 Received: from mail-ej1-x641.google.com ([2a00:1450:4864:20::641]:42396) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jolH4-0005tK-5g; Fri, 26 Jun 2020 06:07:59 -0400 Received: by mail-ej1-x641.google.com with SMTP id i14so8790276ejr.9; Fri, 26 Jun 2020 03:07:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=nsylV5EKN6TiXHALQB7CK9Iue7qUBGaMeqge/7hcRSk=; b=r/AUBLc9DyRh1AL2IF5QFToFvf88lre/N3jnUK/BwOTNi3p6JCAjOJeCMFuGSi7uly TesksxHFnrJt/25hdK73ChJcZVBCQ2CcRYxjBGaUcFAvztat0yddoKPUx2EyLk2fXmGY VBbzMmYWLj6Rs1JFYqRRYGFSP5KjG5KAmaXfoFLDebsXSseIZnNxu5A8lowp2YKe2HPp qhwgqpN3yPMqqR8zSrP6i3MdC9mj5VkPBvVEvtgU2EzZ+x29ssL3W5H3Sm3VZLj00HTv bsAIWauZ68hgjTxnzEug7RicH3hfPkI0fU1JbGkcZQMNb00QDWbOwvnCCXaZZwhc39AV kk2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=nsylV5EKN6TiXHALQB7CK9Iue7qUBGaMeqge/7hcRSk=; b=VApbsC3XhQqenZuJd+HUT3LthMKrorP/j/KiUaGfcDgTG8YPIgryFlruDoaszZhj7K 20xPZG35dWlvFEWtDmCpOV3ffI3I8JvWbjgVshox3DTw3qewNaIRJmihFlCGsmSxPaFo fvqsjRyV8UUUxthOZ9UqC7h9+rqJni8Elx77+HkisInUPFKmIeE9WzTv9sUWvP3kRgnh ovBNRwsM588s/r6jiEhM2Kc04N4l0xIKVsLDnJyTFV26T6J1e59ktTs7Ht3kJ9DdMvSg Vtk3k1Fs5FLqQ2YN+vmyvpHA25ov5ih+DZJ5gBQseh7gKbbTNSBJahTb9CoHZgT7P5aJ bXLA== X-Gm-Message-State: AOAM532/TnRpYw9XI8+vHvSo+QUKvtqu3QI4sQ8qxuYhIZ89qJrbrKzA ilfk1UC3LD1y2U69qggQDFGMasfxaxpDTvC2Eow2glga X-Google-Smtp-Source: ABdhPJwtXZ8O1AZQyTyzNohtew132HxDj1kCL8kRYP/inmIveH635mFFCiQ6QS0hWb/4MPGWXLeomCH1OSNwgvU26R8= X-Received: by 2002:a17:906:a156:: with SMTP id bu22mr1830644ejb.322.1593166076322; Fri, 26 Jun 2020 03:07:56 -0700 (PDT) MIME-Version: 1.0 From: David CARLIER Date: Fri, 26 Jun 2020 11:07:45 +0100 Message-ID: Subject: [PATCH 1/5] haiku build fix To: QEMU Trivial , qemu-devel Received-SPF: pass client-ip=2a00:1450:4864:20::641; envelope-from=devnexen@gmail.com; helo=mail-ej1-x641.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From 4d0933384d2bfcd0fc8c4c06eed2d07f3f1b7f8b Mon Sep 17 00:00:00 2001 From: David Carlier Date: Fri, 26 Jun 2020 10:35:40 +0000 Subject: [PATCH 1/5] Haiku build fix enabling BSD symbols. Signed-off-by: David Carlier Reviewed-by: Peter Maydell --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.26.0 diff --git a/configure b/configure index ba88fd1824..96ba4cf3ce 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 -DBSD_SOURCE $QEMU_CFLAGS" + LIBS="-lposix_error_mapper -lnetwork -lbsd $LIBS" ;; Linux) audio_drv_list="try-pa oss" From patchwork Fri Jun 26 10:07:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David CARLIER X-Patchwork-Id: 11627041 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8E6D6912 for ; Fri, 26 Jun 2020 10:10:16 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6574B20656 for ; Fri, 26 Jun 2020 10:10:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Nf7dl0Tc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6574B20656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:46752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jolJH-0003qJ-M8 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jun 2020 06:10:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jolH7-0000hk-Gs; Fri, 26 Jun 2020 06:08:01 -0400 Received: from mail-ed1-x544.google.com ([2a00:1450:4864:20::544]:43436) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jolH6-0005tR-0X; Fri, 26 Jun 2020 06:08:01 -0400 Received: by mail-ed1-x544.google.com with SMTP id d15so6453350edm.10; Fri, 26 Jun 2020 03:07:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=MSVPMtL0U7LZeXFp6t3i8NiLBjb/HuF+SqmOMbF9Q7U=; b=Nf7dl0TcPihaBgGqB9HYMl6NZafLJNyqqDZnDQ/dUHnMhC/MeGMaIYJsXfq0EfqcPw OOGo9eEzDA8aIxFPWKN7ykhobCGoaiRy8BV9JmVTgVbY7gpvXThjPHBTYAJ4cI5VmAak MZQ2VLhq/eZN62iWFuxtcCLyLSqLm0tZ+Hs9eCFN8z96qcXi/QfYOfjpZq0Yx//5jNqV MrhBfb2Gj8h+SBsdYcXvDXusd6OuSesO2ZeQDrE8J8Csz/K/WBdh+hpPna72Jm5NMeFg YfBKt5VJd7Ec65TNtJs3A3lwY6R3m4x7bV39NltY8QLNbYqC7kJ9LSy0sLxqJZn8gXGx Zyag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=MSVPMtL0U7LZeXFp6t3i8NiLBjb/HuF+SqmOMbF9Q7U=; b=UrmamlsyiweIUOCYkdcnvIb7QzBZ6jonsDDxq7Ymd8lUg68dq4HU3gctgp1FyPur3N YKX3ecfdCZop8Ai1xFTSwKm6QpJf4m6YO+dmyeRDUAkWDyjDfP3Ed+GtPPUI5DFGNlYu MLbBuSEsSxUna3NgGt2KQ20z3u30N8KyJD97C2O30QUala/jRRZDg1tl0JzwnF8aETQi wJYRdw2HdvSCUwRDCe0qcjxFM8Cl7kt9jcjJNuJgHpME9zAU77QQRRKhaVexAiFv2Xp6 sZU3VTVAAgRRHsSXN9rVh68R3vVup28Szu9bE6W09saTJQrhUE8YvZVA2uuJk+pOOSgU 6iRA== X-Gm-Message-State: AOAM5319l8SryHOeTesrTdE8EYplFGm4cl/M4i5u0+UoQdgEv2Pi2+18 CnGf/8wbKePUzbJinsjqDRVEvNBaJAQj2OEx8LlDfI8K X-Google-Smtp-Source: ABdhPJzs+L7vsGWBgDn5C2GwSUJM76LCixQ97aEfvj2ALWJrPp3NMZNNWGsgCEyNIEgL56pbhYsPCYqog8k7bnWqQFk= X-Received: by 2002:a50:cf05:: with SMTP id c5mr2678664edk.232.1593166077974; Fri, 26 Jun 2020 03:07:57 -0700 (PDT) MIME-Version: 1.0 From: David CARLIER Date: Fri, 26 Jun 2020 11:07:47 +0100 Message-ID: Subject: [ PATCH 2/5] haiku build fix To: QEMU Trivial , qemu-devel Received-SPF: pass client-ip=2a00:1450:4864:20::544; envelope-from=devnexen@gmail.com; helo=mail-ed1-x544.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From 19a41d406eda976001827d248398d7fb172d140b Mon Sep 17 00:00:00 2001 From: David Carlier Date: Fri, 26 Jun 2020 10:38:17 +0000 Subject: [PATCH 2/5] Enable *pty API. Signed-off-by: David Carlier Reviewed-by: Peter Maydell --- configure | 9 +++++++++ util/qemu-openpty.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) -- 2.26.0 diff --git a/configure b/configure index 96ba4cf3ce..f040b07463 100755 --- a/configure +++ b/configure @@ -2373,6 +2373,12 @@ else l2tpv3=no fi +if check_include "pty.h" ; then + pty_h=yes +else + pty_h=no +fi + ######################################### # vhost interdependencies and host support @@ -7758,6 +7764,9 @@ fi if test "$sheepdog" = "yes" ; then echo "CONFIG_SHEEPDOG=y" >> $config_host_mak fi +if test "$pty_h" = "yes" ; then + echo "CONFIG_PTY=y" >> $config_host_mak +fi if test "$fuzzing" = "yes" ; then if test "$have_fuzzer" = "yes"; then FUZZ_LDFLAGS=" -fsanitize=address,fuzzer" diff --git a/util/qemu-openpty.c b/util/qemu-openpty.c index 2e8b43bdf5..9d8ad6905e 100644 --- a/util/qemu-openpty.c +++ b/util/qemu-openpty.c @@ -35,7 +35,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" -#if defined(__GLIBC__) +#if defined CONFIG_PTY # include #elif defined CONFIG_BSD # include From patchwork Fri Jun 26 10:07:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David CARLIER X-Patchwork-Id: 11627047 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9F2F36C1 for ; Fri, 26 Jun 2020 10:11:36 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 74590208C7 for ; Fri, 26 Jun 2020 10:11:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="E9TfjT+F" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 74590208C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:50328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jolKZ-0005T9-QS for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jun 2020 06:11:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35398) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jolHA-0000no-F9; Fri, 26 Jun 2020 06:08:04 -0400 Received: from mail-ej1-x644.google.com ([2a00:1450:4864:20::644]:37041) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jolH8-0005tf-Sx; Fri, 26 Jun 2020 06:08:04 -0400 Received: by mail-ej1-x644.google.com with SMTP id mb16so8813026ejb.4; Fri, 26 Jun 2020 03:08:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=zwOhb5W3n8EF+279WipD9/D4F9y/pqe0fiyLrS8XTwc=; b=E9TfjT+FB9c48l0KAh1aoVsgXA8hHyu42E0MjpXNsfQMe40p5YBn8TFPB15z+nQk9h t+wLlbXbmnMS3dsNRPgFDEYcK1BR/qplOgB8Z0fIVWobtj45bTlgUPez8/cnknmUMmPD E2B8wi2+FVTHQg8jCcfucJnBnppbWeNEOtZpIA0ZhwnO3v7h0s9j86c8UkHd0C/fpJhE /Z01pjtYJzajn3b+1rmX0+YlFAPGwq3Dx9Upro0eIqgPlNLHvZ5V0UOMjYlJ3/WHIkKM JPp+Egv/cCZoEQk3rYIXCSEs3avAGSlTU11AdY9vDnjFwPL25+g0GfZIvoFHEzTbUiT6 Rg5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=zwOhb5W3n8EF+279WipD9/D4F9y/pqe0fiyLrS8XTwc=; b=avipaTNWaSCcMhUGhB1qqrfuPJDDbhn0mV2pqCdLR53CWwoo36vTP/dDBkBqVo7dkT fkx/FIoC0unVA7MKQRHt+eF1yxM6TnCB5WCSvXmAflPeiDqRnmgP8gBs3abbbv1EhLI8 CAWM/Abwl4MWVasXR6WYvXFXO2DkkvW1QerQRryLOvLGRJJE9o4Neb5Q5Yzw5Jj9bZT6 Qg1mkCtXEn1FemBvWE6dQwdQejyD0QTWshQU1abDwTGDRXXTAFbd1yBuWNqE//+2Kw3f FcHYE7tl6qyz1f3aXZJ3k01lEGYG6wn5eILBt6v/Znz8IAtLOWlzVh/flFr/KHHMaUbr PqlQ== X-Gm-Message-State: AOAM532y6NDvqF3WwLlgMdW+py+AHLSm5ocbYGveIKgyj3CIAJiKmRfM jA7y2ISUdmN/q/sZo5WmIydoa5jWMmt59w7YWux+Gtao X-Google-Smtp-Source: ABdhPJz3kN2ptLEJWjJfNJss/1PxmTCRKimugvmEOWc0NORKV4BqZf9qhb+pKxAjRofGF5OlXLA+HS7O/fc1iKeuxls= X-Received: by 2002:a17:906:5203:: with SMTP id g3mr1822576ejm.58.1593166081089; Fri, 26 Jun 2020 03:08:01 -0700 (PDT) MIME-Version: 1.0 From: David CARLIER Date: Fri, 26 Jun 2020 11:07:50 +0100 Message-ID: Subject: [PATCH 3/5] haiku build fix To: QEMU Trivial , qemu-devel Received-SPF: pass client-ip=2a00:1450:4864:20::644; envelope-from=devnexen@gmail.com; helo=mail-ej1-x644.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From 56890fa5728d11c72232348b3f3273e2df31c197 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Fri, 26 Jun 2020 10:40:58 +0000 Subject: [PATCH 3/5] Checking mlockall symbol presence Signed-off-by: David Carlier Reviewed-by: Peter Maydell --- configure | 15 +++++++++++++++ os-posix.c | 4 ++++ 2 files changed, 19 insertions(+) -- 2.26.0 diff --git a/configure b/configure index f040b07463..34b0f0f036 100755 --- a/configure +++ b/configure @@ -2379,6 +2379,18 @@ else pty_h=no fi +cat > $TMPC < +int main(int argc, char *argv[]) { + return mlockall(MCL_FUTURE); +} +EOF +if compile_prog "" "" ; then + have_mlockall=yes +else + have_mlockall=no +fi + ######################################### # vhost interdependencies and host support @@ -7767,6 +7779,9 @@ fi if test "$pty_h" = "yes" ; then echo "CONFIG_PTY=y" >> $config_host_mak fi +if test "$have_mlockall" = "yes" ; then + echo "CONFIG_MLOCKALL=y" >> $config_host_mak +fi if test "$fuzzing" = "yes" ; then if test "$have_fuzzer" = "yes"; then FUZZ_LDFLAGS=" -fsanitize=address,fuzzer" diff --git a/os-posix.c b/os-posix.c index 3cd52e1e70..e02b566940 100644 --- a/os-posix.c +++ b/os-posix.c @@ -337,6 +337,7 @@ bool is_daemonized(void) int os_mlock(void) { +#if defined CONFIG_MLOCKALL int ret = 0; ret = mlockall(MCL_CURRENT | MCL_FUTURE); @@ -345,4 +346,7 @@ int os_mlock(void) } return ret; +#else + return -ENOSYS; +#endif } From patchwork Fri Jun 26 10:07:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David CARLIER X-Patchwork-Id: 11627033 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9FA856C1 for ; Fri, 26 Jun 2020 10:08:59 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 71BD920EDD for ; Fri, 26 Jun 2020 10:08:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="m3hA3mas" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 71BD920EDD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:42816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jolI2-0002B1-N9 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jun 2020 06:08:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jolHF-0000yC-B6; Fri, 26 Jun 2020 06:08:09 -0400 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]:45233) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jolHD-0005u8-Pi; Fri, 26 Jun 2020 06:08:09 -0400 Received: by mail-ed1-x543.google.com with SMTP id t21so6451872edr.12; Fri, 26 Jun 2020 03:08:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=co7casgS8A7yMr6HsfA6ziD3K+HGB0wo6n/jnkFdF6c=; b=m3hA3masDltAUq+qQwZlFD/7Vhlw3KGS4KV9ATqlH7BZgfYKctzeZwrO5+pUSDNWxQ b8FRT3e28eLxCVdQKx9lkjI9jmVpmLG7t7RPYpkLpzh5PlSkF75nt+ovLpiOqMUfO/0o q+DUUBK6eXRU8Y8WCIJh5lbkUASpFXHBfiDOLGMk8pQFl6WZXmO99+zCOJd6XrK66tpG f6t1jVMjnD6qz11aqiBFc7SeRDq3kYgZ+DFuQdgSjXZ0A3ygGmaXrs1JdXQqvlTni3jt Uk6SuTZk6+Ow27wX/ewVhC6v4Cb8spnucwpDW88iAbyfUrRt6RbDZED7V0BP6pXV26d1 5+Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=co7casgS8A7yMr6HsfA6ziD3K+HGB0wo6n/jnkFdF6c=; b=TGr/EzIYX7tUzrdDLawRj8KchkafVrqms6ofoUush5CfE+FacTmR+Orz6hAeKDdw2W epVrIGQfFY0LXA+907tZy7FfGyLUg2Es+MfU3xP+IICiTCj7Lw8J/G3RPWIoMsZW+j0v MtlniGlN0TxPpTVczlHiT9ZDFxmiD5lqIrF/KtyNk/5Zz4zYbKyXPgSGUuXlERVZFEPj SIZoMFy8z1OXWcRd8JGp9euYCHcjbrp+uNtog1nHfdjSDNWteA/RLVfCYb+XyrO7p8Ct 7oKFzMq2bt4ZDGBTIDArK9qP3bVvp0+S/7qPTiHi4SHqsHwcPAFkPL4TxIyk1KVz7WcJ FM3Q== X-Gm-Message-State: AOAM533m89j+ZRFaqPiUnEMXAL58aNzgCqJLHUzBu3eExnBI3yN4fDbT xgdQnDnqkxajIA47x2yCfrIEw9IqN7UMGldMDnyYBy2r X-Google-Smtp-Source: ABdhPJxfXhhdm4GIjPDxQJey8+P/V024MK7zV2ktEfJ3/HYD4ztfbKkSHMDwGCkLfBbj2ftRNeA1sxBLZU1iWkcSgGI= X-Received: by 2002:aa7:d297:: with SMTP id w23mr2438717edq.49.1593166086030; Fri, 26 Jun 2020 03:08:06 -0700 (PDT) MIME-Version: 1.0 From: David CARLIER Date: Fri, 26 Jun 2020 11:07:55 +0100 Message-ID: Subject: [PATCH 4/5] haiku build fix To: QEMU Trivial , qemu-devel Received-SPF: pass client-ip=2a00:1450:4864:20::543; envelope-from=devnexen@gmail.com; helo=mail-ed1-x543.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From 775173ded5657de4d4b467f2f68e747f6a9c0750 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Fri, 26 Jun 2020 10:44:36 +0000 Subject: [PATCH 4/5] Platform specific changes qemu_exec_dir implementation Signed-off-by: David Carlier --- include/qemu/osdep.h | 4 ++++ util/oslib-posix.c | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) -- 2.26.0 diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index ff7c17b857..da970cf654 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -388,6 +388,10 @@ void qemu_anon_ram_free(void *ptr, size_t size); #define HAVE_CHARDEV_PARPORT 1 #endif +#if defined(__HAIKU__) +#define SIGIO SIGPOLL +#endif + #if defined(CONFIG_LINUX) #ifndef BUS_MCEERR_AR #define BUS_MCEERR_AR 4 diff --git a/util/oslib-posix.c b/util/oslib-posix.c index 39ddc77c85..ff36fa41ff 100644 --- a/util/oslib-posix.c +++ b/util/oslib-posix.c @@ -38,7 +38,12 @@ #include "qemu/sockets.h" #include "qemu/thread.h" #include +#if !defined __HAIKU__ #include +#else +#include +#include +#endif #include "qemu/cutils.h" #ifdef CONFIG_LINUX @@ -390,6 +395,21 @@ void qemu_init_exec_dir(const char *argv0) } } } +#elif defined(__HAIKU__) + { + image_info ii; + int32_t c = 0; + + *buf = '\0'; + while (get_next_image_info(0, &c, &ii) == B_OK) { + if (ii.type == B_APP_IMAGE) { + strncpy(buf, ii.name, sizeof(buf)); + buf[sizeof(buf) - 1] = '\0'; + p = buf; + break; + } + } + } #endif /* If we don't have any way of figuring out the actual executable location then try argv[0]. */ From patchwork Fri Jun 26 10:07:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David CARLIER X-Patchwork-Id: 11627043 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C98CE912 for ; Fri, 26 Jun 2020 10:10:18 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A010E206A1 for ; Fri, 26 Jun 2020 10:10:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VKFd9LqI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A010E206A1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:46894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jolJJ-0003tv-Tv for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jun 2020 06:10:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jolHG-000122-Rv; Fri, 26 Jun 2020 06:08:10 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]:34901) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jolHF-0005uM-BR; Fri, 26 Jun 2020 06:08:10 -0400 Received: by mail-ed1-x534.google.com with SMTP id e15so6480974edr.2; Fri, 26 Jun 2020 03:08:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=rX57mMIvQKzA8vdxqEO9lhOZZcsX/HGJMLpi1/ra/CU=; b=VKFd9LqIbGI8DNwYmQOgzLAIcQhqZCVO2iYiOo66kPXNlwjMavySnAk+Y3IspVG6Ms 6TQKxJFTnZXEnbVvNuYCelmmNauwcRwxSJ9EE6vozbJoEkcZKZM0fCHoD7MT8oXFarRV 3BBl4bD1AsqdTImljyLa2EqMaQ7EjbPXY8kBKH7td6KTOB5w5sXyMm8SWyDnd65Rya7D /JdieGQ9Eg0wbUDi9LGblW7s1nfMjSCVOgsdjLvCA0OQRh4M1hPzV3qlIJL7bH2FFRGF rpd25g93Axxj1oUBVr83wPp3/RLH2fgRV3OMZEQwn85OMgFxFZ4D950hPjmvqnpsGNLb h6QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=rX57mMIvQKzA8vdxqEO9lhOZZcsX/HGJMLpi1/ra/CU=; b=aaywXwpMLqmUWiFgNA0odQIn/jd+WeT4m8yWeAaq07vTK8Xx8mVdL3yRF/lsfgECvy IZjF0OdS2JjqxZ+WSz236LGm46iVn9v2UmLt0Ry1iSsfK5zZV+3J2kIa7Z71+xt/r6BR 0vvzN0gDXsAaVZpQZX2trcexgBZp4FLPUVUG34Q1DFQn5zBRM6h+vq/V7PrCcbYF5hWy 55O3NW5NbZfKzxrfa+LYq7hKeOl3HkCC4ErpCpBoPKLFQQRHgdHzpNhcKnlxCkK5Opmk oglII0asK5ui0Iscm+L1YY+aeW2iQBUKE18QDiA1jdQ9ZKlCK3tA4K5WFFhUlitpEXE7 7nXQ== X-Gm-Message-State: AOAM531HWZV+ql+jN9SxN7yT6UmVZKCehZ10aVci2SsPsVi5oCWsU5wl TC0UNq+tNHRssy/5zIvHqKXpHFncX2gc13mThEAHX/ys X-Google-Smtp-Source: ABdhPJyCn9EokLBUkTMiVMaMesePbnAXOX0Q9+2VyFm4JA82aN+hSkG6wq5c4sPEDaBuhyP6+jBap4VoGDDML0ww0Bk= X-Received: by 2002:a05:6402:1597:: with SMTP id c23mr2419416edv.243.1593166087521; Fri, 26 Jun 2020 03:08:07 -0700 (PDT) MIME-Version: 1.0 From: David CARLIER Date: Fri, 26 Jun 2020 11:07:57 +0100 Message-ID: Subject: [PATCH 5/5] haiku build fix To: QEMU Trivial , qemu-devel Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=devnexen@gmail.com; helo=mail-ed1-x534.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From 68d4d4312eccd212b4d2484e09425816ebd2346a Mon Sep 17 00:00:00 2001 From: David Carlier Date: Fri, 26 Jun 2020 11:01:54 +0000 Subject: [PATCH 5/5] Last chunk of build fix Signed-off-by: David Carlier --- include/qemu/bswap.h | 2 ++ util/Makefile.objs | 2 +- util/compatfd.c | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) -- 2.26.0 diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h index 2a9f3fe783..1d3e4c24e4 100644 --- a/include/qemu/bswap.h +++ b/include/qemu/bswap.h @@ -8,6 +8,8 @@ # include #elif defined(__FreeBSD__) # include +#elif defined(__HAIKU__) +# include #elif defined(CONFIG_BYTESWAP_H) # include diff --git a/util/Makefile.objs b/util/Makefile.objs index cc5e37177a..faebc13fac 100644 --- a/util/Makefile.objs +++ b/util/Makefile.objs @@ -39,7 +39,7 @@ util-obj-y += qsp.o util-obj-y += range.o util-obj-y += stats64.o util-obj-y += systemd.o -util-obj-$(CONFIG_POSIX) += drm.o +util-obj-$(CONFIG_LINUX) += drm.o util-obj-y += guest-random.o util-obj-$(CONFIG_GIO) += dbus.o dbus.o-cflags = $(GIO_CFLAGS) diff --git a/util/compatfd.c b/util/compatfd.c index c296f55d14..ee47dd8089 100644 --- a/util/compatfd.c +++ b/util/compatfd.c @@ -16,7 +16,9 @@ #include "qemu/osdep.h" #include "qemu/thread.h" +#if defined(CONFIG_SIGNALFD) #include +#endif struct sigfd_compat_info {