- Add vhba-signal.diff so it builds with Linux 4.11

OBS-URL: https://build.opensuse.org/package/show/filesystems/vhba-kmp?expand=0&rev=25
This commit is contained in:
Jan Engelhardt 2017-05-17 22:20:18 +00:00 committed by Git OBS Bridge
parent eb37e59a07
commit 4b92b266ca
3 changed files with 33 additions and 2 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed May 17 22:20:05 UTC 2017 - jengelh@inai.de
- Add vhba-signal.diff so it builds with Linux 4.11
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Feb 6 17:35:38 UTC 2017 - jengelh@inai.de Mon Feb 6 17:35:38 UTC 2017 - jengelh@inai.de

View File

@ -29,11 +29,12 @@ Source: http://downloads.sf.net/cdemu/vhba-module-%version.tar.bz2
Source2: %name-preamble Source2: %name-preamble
Patch1: vhba-no-werror.diff Patch1: vhba-no-werror.diff
Patch2: vhba-devname.diff Patch2: vhba-devname.diff
Patch3: vhba-signal.diff
BuildRequires: kernel-syms >= 2.6.20 BuildRequires: kernel-syms >= 2.6.20
BuildRequires: modutils BuildRequires: modutils
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%kernel_module_package -n vhba -p %name-preamble %{?kernel_module_package:%kernel_module_package -n vhba -p %name-preamble}
%description %description
A Linux kernel module implementing a virtual SCSI Host Bus Adapter to A Linux kernel module implementing a virtual SCSI Host Bus Adapter to
@ -56,7 +57,7 @@ Linux.
%prep %prep
echo %flavors_to_build echo %flavors_to_build
%setup -qn vhba-module-%version %setup -qn vhba-module-%version
%patch -P 1 -P 2 -p1 %patch -P 1 -P 2 -P 3 -p1
%build %build
for flavor in %flavors_to_build; do for flavor in %flavors_to_build; do

25
vhba-signal.diff Normal file
View File

@ -0,0 +1,25 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2017-05-18 00:18:13.674608963 +0200
build: resolve build failure with Linux 4.11+
vhba.c:711:13: error: implicit declaration of function 'signal_pending' [-Werror=implicit-function-declaration]
if (signal_pending(current)) {
---
vhba.c | 3 +++
1 file changed, 3 insertions(+)
Index: vhba-module-20161009/vhba.c
===================================================================
--- vhba-module-20161009.orig/vhba.c
+++ vhba-module-20161009/vhba.c
@@ -28,6 +28,9 @@
#include <linux/poll.h>
#include <linux/slab.h>
#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
+# include <linux/sched/signal.h>
+#endif
#ifdef CONFIG_COMPAT
#include <linux/compat.h>
#endif