summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@netfilter.org>2022-11-07 21:47:23 +0100
committerJozsef Kadlecsik <kadlec@netfilter.org>2022-11-07 21:47:23 +0100
commitb0a56bb18f10e5be0c2bf668ce50c0203c2b2bdb (patch)
treed88e5320fddc3f06e53a22db0fa297e188bbaac0
parent44add864f40da00b48f1d4437a8e7cfd92da84a8 (diff)
Compatibility: check kvcalloc, kvfree, kvzalloc in slab.h too
-rw-r--r--configure.ac14
1 files changed, 13 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 1acc976..e1ff357 100644
--- a/configure.ac
+++ b/configure.ac
@@ -443,6 +443,10 @@ if test -f $ksourcedir/include/linux/mm.h && \
$GREP -q 'kvcalloc' $ksourcedir/include/linux/mm.h; then
AC_MSG_RESULT(yes)
AC_SUBST(HAVE_KVCALLOC, define)
+elif test -f $ksourcedir/include/linux/slab.h && \
+ $GREP -q 'kvcalloc' $ksourcedir/include/linux/slab.h; then
+ AC_MSG_RESULT(yes)
+ AC_SUBST(HAVE_KVCALLOC, define)
else
AC_MSG_RESULT(no)
AC_SUBST(HAVE_KVCALLOC, undef)
@@ -453,6 +457,10 @@ if test -f $ksourcedir/include/linux/mm.h && \
$GREP -q 'kvfree' $ksourcedir/include/linux/mm.h; then
AC_MSG_RESULT(yes)
AC_SUBST(HAVE_KVFREE, define)
+elif test -f $ksourcedir/include/linux/slab.h && \
+ $GREP -q 'kvfree' $ksourcedir/include/linux/slab.h; then
+ AC_MSG_RESULT(yes)
+ AC_SUBST(HAVE_KVFREE, define)
else
AC_MSG_RESULT(no)
AC_SUBST(HAVE_KVFREE, undef)
@@ -837,11 +845,15 @@ else
AC_SUBST(HAVE_NLMSG_UNICAST, undef)
fi
-AC_MSG_CHECKING([kernel source for kvzalloc() in mm.h])
+AC_MSG_CHECKING([kernel source for kvzalloc() in mm.h and slab.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)
+elif test -f $ksourcedir/include/linux/slab.h && \
+ $GREP -q 'kvzalloc' $ksourcedir/include/linux/slab.h; then
+ AC_MSG_RESULT(yes)
+ AC_SUBST(HAVE_KVZALLOC, define)
else
AC_MSG_RESULT(no)
AC_SUBST(HAVE_KVZALLOC, undef)