aboutsummaryrefslogtreecommitdiff
path: root/block-raw-posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'block-raw-posix.c')
-rw-r--r--block-raw-posix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block-raw-posix.c b/block-raw-posix.c
index 57e35356e3..8b28a43c50 100644
--- a/block-raw-posix.c
+++ b/block-raw-posix.c
@@ -750,7 +750,7 @@ static int64_t raw_getlength(BlockDriverState *bs)
BDRVRawState *s = bs->opaque;
int fd = s->fd;
int64_t size;
-#ifdef _BSD
+#ifdef HOST_BSD
struct stat sb;
#endif
#ifdef __sun__
@@ -763,7 +763,7 @@ static int64_t raw_getlength(BlockDriverState *bs)
if (ret < 0)
return ret;
-#ifdef _BSD
+#ifdef HOST_BSD
if (!fstat(fd, &sb) && (S_IFCHR & sb.st_mode)) {
#ifdef DIOCGMEDIASIZE
if (ioctl(fd, DIOCGMEDIASIZE, (off_t *)&size))