summaryrefslogtreecommitdiff
path: root/emulators/qemu-devel/files/patch-bb
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/qemu-devel/files/patch-bb')
-rw-r--r--emulators/qemu-devel/files/patch-bb11
1 files changed, 11 insertions, 0 deletions
diff --git a/emulators/qemu-devel/files/patch-bb b/emulators/qemu-devel/files/patch-bb
new file mode 100644
index 000000000000..02302a316df2
--- /dev/null
+++ b/emulators/qemu-devel/files/patch-bb
@@ -0,0 +1,11 @@
+Index: qemu/block.c
+@@ -175,7 +175,9 @@
+ #ifdef _BSD
+ struct stat sb;
+ if (!fstat(fd,&sb) && (S_IFCHR & sb.st_mode)) {
++#ifdef DIOCGMEDIASIZE
+ if (ioctl(fd, DIOCGMEDIASIZE, (off_t *)&size))
++#endif
+ size = lseek(fd, 0LL, SEEK_END);
+ } else
+ #endif