summaryrefslogtreecommitdiff
path: root/emulators/qemu/files/patch-bb
blob: 02302a316df2302c75a84ec5b0c87831d7f045d3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
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