block/file-posix: Clean up sys/ioctl import

Since all platforms except sun include this header,
clean up the ifdefs.

Signed-off-by: Damien Zammit <damien@zamaudio.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260208055858.2166524-5-damien@zamaudio.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Damien Zammit
2026-02-08 05:59:38 +00:00
committed by Paolo Bonzini
parent cbac856308
commit 9c5fbd478f

View File

@@ -43,9 +43,11 @@
#include "scsi/constants.h"
#include "scsi/utils.h"
#if defined(__APPLE__) && (__MACH__)
#ifndef __sun__
#include <sys/ioctl.h>
#if defined(HAVE_HOST_BLOCK_DEVICE)
#endif
#if defined(__APPLE__) && (__MACH__) && defined(HAVE_HOST_BLOCK_DEVICE)
#include <paths.h>
#include <sys/param.h>
#include <sys/mount.h>
@@ -57,7 +59,6 @@
//#include <IOKit/storage/IOCDTypes.h>
#include <IOKit/storage/IODVDMedia.h>
#include <CoreFoundation/CoreFoundation.h>
#endif /* defined(HAVE_HOST_BLOCK_DEVICE) */
#endif
#ifdef __sun__
@@ -65,7 +66,6 @@
#include <sys/dkio.h>
#endif
#ifdef __linux__
#include <sys/ioctl.h>
#include <sys/param.h>
#include <sys/syscall.h>
#include <sys/vfs.h>
@@ -95,27 +95,20 @@
#endif
#ifdef __OpenBSD__
#include <sys/ioctl.h>
#include <sys/disklabel.h>
#include <sys/dkio.h>
#endif
#ifdef __NetBSD__
#include <sys/ioctl.h>
#include <sys/disklabel.h>
#include <sys/dkio.h>
#include <sys/disk.h>
#endif
#ifdef __DragonFly__
#include <sys/ioctl.h>
#include <sys/diskslice.h>
#endif
#ifdef EMSCRIPTEN
#include <sys/ioctl.h>
#endif
/* OS X does not have O_DSYNC */
#ifndef O_DSYNC
#ifdef O_SYNC