File bsc1223370.patch of Package ipset.33817

From b0a56bb18f10e5be0c2bf668ce50c0203c2b2bdb Mon Sep 17 00:00:00 2001
From: Jozsef Kadlecsik <kadlec@netfilter.org>
Date: Mon, 7 Nov 2022 21:47:23 +0100
Subject: Compatibility: check kvcalloc, kvfree, kvzalloc in slab.h too

---
 configure.ac | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

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)
-- 
cgit v1.2.3

openSUSE Build Service is sponsored by