From: Jozsef Kadlecsik Date: Mon, 7 Nov 2022 20:47:23 +0000 (+0100) Subject: Compatibility: check kvcalloc, kvfree, kvzalloc in slab.h too X-Git-Tag: v7.16~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b0a56bb18f10e5be0c2bf668ce50c0203c2b2bdb;p=thirdparty%2Fipset.git Compatibility: check kvcalloc, kvfree, kvzalloc in slab.h too --- diff --git a/configure.ac b/configure.ac index 1acc9762..e1ff357b 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)