All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	qemu-block@nongnu.org, mreitz@redhat.com,
	"Joelle van Dyne" <j@getutm.app>,
	mlevitsk@redhat.com, "Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [PATCH 08/11] block: check for sys/disk.h
Date: Thu, 24 Jun 2021 20:04:20 +0200	[thread overview]
Message-ID: <20210624180423.1322165-9-pbonzini@redhat.com> (raw)
In-Reply-To: <20210624180423.1322165-1-pbonzini@redhat.com>

From: Joelle van Dyne <j@getutm.app>

Some BSD platforms do not have this header.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Joelle van Dyne <j@getutm.app>
Message-Id: <20210315180341.31638-3-j@getutm.app>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 block.c     | 2 +-
 meson.build | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/block.c b/block.c
index 3f456892d0..1d37f133a8 100644
--- a/block.c
+++ b/block.c
@@ -54,7 +54,7 @@
 #ifdef CONFIG_BSD
 #include <sys/ioctl.h>
 #include <sys/queue.h>
-#ifndef __DragonFly__
+#if defined(HAVE_SYS_DISK_H)
 #include <sys/disk.h>
 #endif
 #endif
diff --git a/meson.build b/meson.build
index bb3a5be796..a95a9fbcbf 100644
--- a/meson.build
+++ b/meson.build
@@ -1250,6 +1250,7 @@ config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h'))
 config_host_data.set('HAVE_SYS_KCOV_H', cc.has_header('sys/kcov.h'))
 config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system', prefix: '#include <stdlib.h>'))
 config_host_data.set('HAVE_HOST_BLOCK_DEVICE', have_host_block_device)
+config_host_data.set('HAVE_SYS_DISK_H', cc.has_header('sys/disk.h'))
 
 config_host_data.set('CONFIG_PREADV', cc.has_function('preadv', prefix: '#include <sys/uio.h>'))
 
-- 
2.31.1




  parent reply	other threads:[~2021-06-24 18:14 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-24 18:04 [PATCH v5 00/11] block: file-posix queue Paolo Bonzini
2021-06-24 18:04 ` [PATCH 01/11] file-posix: fix max_iov for /dev/sg devices Paolo Bonzini
2021-06-24 18:04 ` [PATCH 02/11] scsi-generic: pass max_segments via max_iov field in BlockLimits Paolo Bonzini
2021-06-24 18:04 ` [PATCH 03/11] osdep: provide ROUND_DOWN macro Paolo Bonzini
2021-06-25  7:42   ` Max Reitz
2021-06-25  8:26   ` Philippe Mathieu-Daudé
2021-06-24 18:04 ` [PATCH 04/11] block-backend: align max_transfer to request alignment Paolo Bonzini
2021-06-25  7:52   ` Max Reitz
2021-06-24 18:04 ` [PATCH 05/11] block: add max_hw_transfer to BlockLimits Paolo Bonzini
2021-06-25  7:58   ` Max Reitz
2021-06-24 18:04 ` [PATCH 06/11] file-posix: try BLKSECTGET on block devices too, do not round to power of 2 Paolo Bonzini
2021-06-25  8:19   ` Max Reitz
2021-06-24 18:04 ` [PATCH 07/11] block: feature detection for host block support Paolo Bonzini
2021-06-25  8:20   ` Max Reitz
2021-06-24 18:04 ` Paolo Bonzini [this message]
2021-06-24 18:04 ` [PATCH 09/11] block: try BSD disk size ioctls one after another Paolo Bonzini
2021-06-25  8:29   ` Max Reitz
2021-06-24 18:04 ` [PATCH 10/11] block: detect DKIOCGETBLOCKCOUNT/SIZE before use Paolo Bonzini
2021-06-25  8:30   ` Max Reitz
2021-06-24 18:04 ` [PATCH 11/11] file-posix: handle EINTR during ioctl Paolo Bonzini
2021-06-25  8:30   ` Philippe Mathieu-Daudé
2021-06-25  8:35   ` Max Reitz
2021-06-25  8:37 ` [PATCH v5 00/11] block: file-posix queue Max Reitz
2021-06-25  8:52   ` Paolo Bonzini
2021-06-25  9:28     ` Max Reitz

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=20210624180423.1322165-9-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=j@getutm.app \
    --cc=mlevitsk@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-block@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.