FreeBSD: Remove some illumos compat from vnode.h
[zfs.git] / config / kernel-strlcpy.m4
blobd50b0035e9d9913cf52c148b3f14805cdd978ca5
1 dnl #
2 dnl # 6.8 removed strlcpy.
3 dnl #
4 AC_DEFUN([ZFS_AC_KERNEL_SRC_STRLCPY], [
5         ZFS_LINUX_TEST_SRC([kernel_has_strlcpy], [
6                 #include <linux/string.h>
7         ], [
8                 const char *src = "goodbye";
9                 char dst[32];
10                 size_t len;
11                 len = strlcpy(dst, src, sizeof (dst));
12         ])
15 AC_DEFUN([ZFS_AC_KERNEL_STRLCPY], [
16         AC_MSG_CHECKING([whether strlcpy() exists])
17         ZFS_LINUX_TEST_RESULT([kernel_has_strlcpy], [
18                 AC_MSG_RESULT([yes])
19                 AC_DEFINE(HAVE_KERNEL_STRLCPY, 1,
20                         [strlcpy() exists])
21         ], [
22                 AC_MSG_RESULT([no])
23         ])