This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 3d761d5d0d7165b7c1fd98a3b7030929510c2296
Author: Mo Chen <[email protected]>
AuthorDate: Tue Apr 22 18:02:09 2025 -0500

    Fix FreeBSD Raw Cache Disk Support (#12200)
    
    When we use a raw cache disk, we must obtain the disk's geometry using 
ioctl.  At some point it became necessary to include <sys/disk.h> in order to 
have these ioctl numbers in FreeBSD.
    
    (cherry picked from commit 74aa8e50a7a3c5d7b1fc6d75c89bdcd939dd1c35)
---
 src/tscore/ink_file.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/tscore/ink_file.cc b/src/tscore/ink_file.cc
index e2be7e3416..6546873ad6 100644
--- a/src/tscore/ink_file.cc
+++ b/src/tscore/ink_file.cc
@@ -36,6 +36,10 @@
 #include <sys/mount.h> /* for BLKGETSIZE */
 #endif
 
+#if __has_include(<sys/disk.h>)
+#include <sys/disk.h> /* for DIOCGMEDIASIZE on FreeBSD */
+#endif
+
 using ioctl_arg_t = union {
   uint64_t u64;
   uint32_t u32;

Reply via email to