The declaration and the call is FreeBSD-specific. Like any DIOC... macro. APPLE's ioctl name PREFIX is DKIO rather than DIOC. They share only header file (sys/disk.h) with completely different content. So only FreeBSD is supported by new code that is achieved with DIOCGFWSECTORS #define check.
FreeBSD: Add workaround for 4096-aligned drives