]> git.proxmox.com Git - mirror_spl-debian.git/blame - config/kernel-kuidgid.m4
dch: close a bug and refresh timestamp.
[mirror_spl-debian.git] / config / kernel-kuidgid.m4
CommitLineData
34ee731f
AX
1dnl #
2dnl # User namespaces, use kuid_t in place of uid_t
3dnl # where available. Not strictly a user namespaces thing
4dnl # but it should prevent surprises
5dnl #
6AC_DEFUN([SPL_AC_KUIDGID_T], [
7 AC_MSG_CHECKING([whether kuid_t/kgid_t is available])
8 SPL_LINUX_TRY_COMPILE([
9 #include <linux/uidgid.h>
10 ], [
11 kuid_t userid = KUIDT_INIT(0);
12 kgid_t groupid = KGIDT_INIT(0);
13 ],[
14 SPL_LINUX_TRY_COMPILE([
15 #include <linux/uidgid.h>
16 ], [
17 kuid_t userid = 0;
18 kgid_t groupid = 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])