blob: 6c9dc50ba31d2975db73dc8ee3155bc5f6498c15 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
--- src/jrd/os/posix/unix.cpp 2021-06-22 00:38:07.434896000 -0500
+++ src/jrd/os/posix/unix.cpp 2021-06-22 00:43:54.988645000 -0500
@@ -56,6 +56,13 @@
#include <linux/fs.h>
#endif
+#ifdef FREEBSD
+#include <sys/disk.h>
+#define BLKGETSIZE64 DIOCGMEDIASIZE
+#define BLKGETSIZE DIOCGMEDIASIZE
+#define BLKSSZGET DIOCGSECTORSIZE
+#endif
+
#endif //SUPPORT_RAW_DEVICES
#include "../jrd/jrd.h"
@@ -495,7 +502,7 @@
// Looks like any OS needs own ioctl() to determine raw device size
#undef HAS_RAW_SIZE
-#ifdef LINUX
+#if defined(LINUX) || defined(FREEBSD)
#ifdef BLKGETSIZE64
if (ioctl(file->fil_desc, BLKGETSIZE64, &length) != 0)
#endif /*BLKGETSIZE64*/
|