xref: /freebsd/sys/contrib/openzfs/config/user-largefile.m4 (revision 546d3d08e5993cbe2d6141b256e8c2ebad5aa102)
1dnl #
2dnl # ZFS_AC_CONFIG_USER_LARGEFILE
3dnl #
4dnl # Ensure off_t is 64-bit for large file support in userspace.
5dnl # This is required for OpenZFS to handle files larger than 2GB.
6dnl #
7AC_DEFUN([ZFS_AC_CONFIG_USER_LARGEFILE], [
8	AC_SYS_LARGEFILE
9	AC_CHECK_SIZEOF([off_t])
10
11	AC_MSG_CHECKING([for 64-bit off_t])
12	AS_IF([test "$ac_cv_sizeof_off_t" -ne 8], [
13		AC_MSG_RESULT([no, $ac_cv_sizeof_off_t bytes])
14		AC_MSG_FAILURE([
15*** OpenZFS userspace requires 64-bit off_t support for large files.
16*** Please ensure your system supports large file operations.
17*** Current off_t size: $ac_cv_sizeof_off_t bytes])
18	], [
19		AC_MSG_RESULT([yes, $ac_cv_sizeof_off_t bytes])
20	])
21])
22