Skip to content

Commit 78628a5

Browse files
authored
FreeBSD: Use new SYSCTL_SIZEOF()
SYSCTL_SIZEOF() has been introduced in FreeBSD by commit "sysctl(9): Ease exporting struct sizes; Discourage doing that" (713abc9880aa) in branch 'main'. It will soon be backported to 'stable/14'. We will thus be able to remove the old, alternate version left in the '#else' branch as soon as 'stable/13' goes out of support (April 30, 2026). Sponsored-by: The FreeBSD Foundation Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Olivier Certner <[email protected]> Closes #17309
1 parent b1ccab1 commit 78628a5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

module/os/freebsd/zfs/zfs_znode_os.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,12 @@
6767
#include "zfs_comutil.h"
6868

6969
/* Used by fstat(1). */
70+
#ifdef SYSCTL_SIZEOF
71+
SYSCTL_SIZEOF(znode, znode_t);
72+
#else
7073
SYSCTL_INT(_debug_sizeof, OID_AUTO, znode, CTLFLAG_RD,
7174
SYSCTL_NULL_INT_PTR, sizeof (znode_t), "sizeof(znode_t)");
75+
#endif
7276

7377
/*
7478
* Define ZNODE_STATS to turn on statistic gathering. By default, it is only

0 commit comments

Comments
 (0)