mbox series

[v2,0/3] nbd: build qemu-nbd on Windows

Message ID 20200825103850.119911-1-berrange@redhat.com
Headers show
Series nbd: build qemu-nbd on Windows | expand

Message

Daniel P. Berrangé Aug. 25, 2020, 10:38 a.m. UTC
We are already building the NBD client and server on Windows when it is
used via the main system emulator binaries. This demonstrates there is
no fundamental blocker to buildig the qemu-nbd binary too.

Changed in v2:

 - Split second patch into two parts
 - Use  HAVE_NBD_DEVICE condition to disable SIGTERM handler not WIN32

Daniel P. Berrangé (3):
  block: add missing socket_init() calls to tools
  nbd: skip SIGTERM handler if NBD device support is not built
  nbd: disable signals and forking on Windows builds

 meson.build |  7 ++-----
 qemu-img.c  |  2 ++
 qemu-io.c   |  2 ++
 qemu-nbd.c  | 11 ++++++++++-
 4 files changed, 16 insertions(+), 6 deletions(-)

-- 
2.26.2

Comments

Eric Blake Sept. 2, 2020, 9:27 p.m. UTC | #1
On 8/25/20 5:38 AM, Daniel P. Berrangé wrote:
> The termsig_handler function is used by the client thread handling the
> host NBD device connection to do a graceful shutdown. IOW, if we have
> disabled NBD device support at compile time, we don't need the SIGTERM
> handler. This fixes a build issue for Windows.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>   qemu-nbd.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)

Reviewed-by: Eric Blake <eblake@redhat.com>