54ce503f0a
After firebird25-* was removed from the tree firebird30-* bacem the new default. And some consumers of firebird started failing to build with the error "/usr/local/include/ibase.h:6:10: fatal error: '../jrd/ibase.h' file not found". In previous the src headers files were installed which were not sanitized and required other header files from the source tree. This patch properly installs the sanitized header files and fixes the consumer builds. While I am here fix the patches to be makepatch compatible. Approved by: portmgr(just-fix-it)
26 lines
679 B
C++
26 lines
679 B
C++
--- src/jrd/os/posix/unix.cpp.orig 2022-06-07 08:18:52 UTC
|
|
+++ src/jrd/os/posix/unix.cpp
|
|
@@ -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"
|
|
@@ -496,7 +503,7 @@ ULONG PIO_get_number_of_pages(const jrd_file* file, co
|
|
// 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*/
|