From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pankaj Gupta Subject: Re: [PATCH] kni: fix build with kernel 4.11 Date: Tue, 21 Mar 2017 03:12:23 -0400 (EDT) Message-ID: <1329679947.4861299.1490080343155.JavaMail.zimbra@redhat.com> References: <20170320112208.7941-1-ferruh.yigit@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Jerin Jacob , dev@dpdk.org To: Ferruh Yigit Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id BAB63101B for ; Tue, 21 Mar 2017 08:12:24 +0100 (CET) In-Reply-To: <20170320112208.7941-1-ferruh.yigit@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hello, >=20 > compile error: > .../build/build/lib/librte_eal/linuxapp/kni/kni_net.c:124:6: > error: implicit declaration of function =E2=80=98signal_pending=E2=80=99 > [-Werror=3Dimplicit-function-declaration] > if (signal_pending(current) || ret_val <=3D 0) { > ^~~~~~~~~~~~~~ >=20 > Linux 4.11 moves signal function declarations to its own header file: > Linux: 174cd4b1e5fb ("sched/headers: Prepare to move signal wakeup & > sigpending methods from into ") >=20 > User new header file "linux/sched/signal.h" to fix build error. >=20 > Reported-by: Jerin Jacob > Signed-off-by: Ferruh Yigit > --- > lib/librte_eal/linuxapp/kni/compat.h | 6 ++++++ > lib/librte_eal/linuxapp/kni/kni_dev.h | 6 ++++++ > 2 files changed, 12 insertions(+) >=20 > diff --git a/lib/librte_eal/linuxapp/kni/compat.h > b/lib/librte_eal/linuxapp/kni/compat.h > index 78da08e..d96275a 100644 > --- a/lib/librte_eal/linuxapp/kni/compat.h > +++ b/lib/librte_eal/linuxapp/kni/compat.h > @@ -2,6 +2,8 @@ > * Minimal wrappers to allow compiling kni on older kernels. > */ > =20 > +#include > + > #ifndef RHEL_RELEASE_VERSION > #define RHEL_RELEASE_VERSION(a, b) (((a) << 8) + (b)) > #endif > @@ -67,3 +69,7 @@ > =09(LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34))) > #undef NET_NAME_UNKNOWN > #endif > + > +#if LINUX_VERSION_CODE >=3D KERNEL_VERSION(4, 11, 0) > +#define HAVE_SIGNAL_FUNCTIONS_OWN_HEADER > +#endif > diff --git a/lib/librte_eal/linuxapp/kni/kni_dev.h > b/lib/librte_eal/linuxapp/kni/kni_dev.h > index 002e5fa..72385ab 100644 > --- a/lib/librte_eal/linuxapp/kni/kni_dev.h > +++ b/lib/librte_eal/linuxapp/kni/kni_dev.h > @@ -30,9 +30,15 @@ > #endif > #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > =20 > +#include "compat.h" > + > #include > #include > +#ifdef HAVE_SIGNAL_FUNCTIONS_OWN_HEADER > +#include > +#else > #include > +#endif > #include > #include > #include > -- > 2.9.3 This patch fixes build error of DPDK with linux kernel version 4.11.0-rc2 f= or me. Tested-by:pagupta@redhat.com >=20 >=20