]> granicus.if.org Git - zfs/blob - config/kernel-kuidgid.m4
Check for strlcat and strlcpy
[zfs] / config / kernel-kuidgid.m4
1 dnl #
2 dnl # User namespaces, use kuid_t in place of uid_t
3 dnl # where available. Not strictly a user namespaces thing
4 dnl # but it should prevent surprises
5 dnl #
6 AC_DEFUN([ZFS_AC_KERNEL_KUIDGID_T], [
7         AC_MSG_CHECKING([whether kuid_t/kgid_t is available])
8         ZFS_LINUX_TRY_COMPILE([
9                 #include <linux/uidgid.h>
10         ], [
11                 kuid_t userid __attribute__ ((unused)) = KUIDT_INIT(0);
12                 kgid_t groupid __attribute__ ((unused)) = KGIDT_INIT(0);
13         ],[
14                 ZFS_LINUX_TRY_COMPILE([
15                         #include <linux/uidgid.h>
16                 ], [
17                         kuid_t userid __attribute__ ((unused)) = 0;
18                         kgid_t groupid __attribute__ ((unused)) = 0;
19                 ],[
20                         AC_MSG_RESULT(yes; optional)
21                 ],[
22                         AC_MSG_RESULT(yes; mandatory)
23                         AC_DEFINE(HAVE_KUIDGID_T, 1, [kuid_t/kgid_t in use])
24                 ])
25         ],[
26                 AC_MSG_RESULT(no)
27         ])
28 ])