summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@netfilter.org>2020-11-19 15:01:37 +0100
committerJozsef Kadlecsik <kadlec@netfilter.org>2020-11-19 15:50:45 +0100
commit04f17089afbc3438a7a33bc04f69e7b378000b92 (patch)
tree87e8b9f217b5b89984ddd734dd798eff59cbdc35 /configure.ac
parent434aa00c04428bdded30191477064ab4078e7fe8 (diff)
Compatibility: check for kvzalloc() and GFP_KERNEL_ACCOUNT
Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 1ee4abd..c10f9f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -776,6 +776,26 @@ else
AC_SUBST(HAVE_NLA_POLICY_EXACT_LEN, undef)
fi
+AC_MSG_CHECKING([kernel source for kvzalloc() in mm.h])
+if test -f $ksourcedir/include/linux/mm.h && \
+ $GREP -q 'static inline void \*kvzalloc(' $ksourcedir/include/linux/mm.h; then
+ AC_MSG_RESULT(yes)
+ AC_SUBST(HAVE_KVZALLOC, define)
+else
+ AC_MSG_RESULT(no)
+ AC_SUBST(HAVE_KVZALLOC, undef)
+fi
+
+AC_MSG_CHECKING([kernel source for GFP_KERNEL_ACCOUNT in gfp.h])
+if test -f $ksourcedir/include/linux/gfp.h && \
+ $GREP -q 'define GFP_KERNEL_ACCOUNT' $ksourcedir/include/linux/gfp.h; then
+ AC_MSG_RESULT(yes)
+ AC_SUBST(HAVE_GFP_KERNEL_ACCOUNT, define)
+else
+ AC_MSG_RESULT(no)
+ AC_SUBST(HAVE_GFP_KERNEL_ACCOUNT, undef)
+fi
+
AC_MSG_CHECKING([kernel source for struct net_generic])
if test -f $ksourcedir/include/net/netns/generic.h && \
$GREP -q 'struct net_generic' $ksourcedir/include/net/netns/generic.h; then