[packages/tpm_emulator] - fixed building with linux 4.1 - rel 14

baggins baggins at pld-linux.org
Sat Jul 4 15:13:05 CEST 2015


commit 3ead4e65ef65a05c4ff4d89655313646ff7a66b2
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Jul 4 15:12:50 2015 +0200

    - fixed building with linux 4.1
    - rel 14

 linux-4.1.patch   | 14 ++++++++++++++
 tpm_emulator.spec |  4 +++-
 2 files changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/tpm_emulator.spec b/tpm_emulator.spec
index 5ffb160..e136c40 100644
--- a/tpm_emulator.spec
+++ b/tpm_emulator.spec
@@ -21,7 +21,7 @@ exit 1
 %define		_duplicate_files_terminate_build	0
 
 %define	pname	tpm_emulator
-%define	rel	13
+%define	rel	14
 Summary:	Software-based TPM and MTM Emulator
 Summary(pl.UTF-8):	Programowy emulator TPM i MTM
 Name:		%{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
@@ -33,6 +33,7 @@ Source0:	http://downloads.sourceforge.net/tpm-emulator.berlios/%{pname}-%{versio
 # Source0-md5:	e26becb8a6a2b6695f6b3e8097593db8
 Patch0:		%{pname}-libdir.patch
 Patch1:		linux-3.19.patch
+Patch2:		linux-4.1.patch
 URL:		http://tpm-emulator.berlios.de/
 BuildRequires:	cmake >= 2.4
 BuildRequires:	gmp-devel
@@ -124,6 +125,7 @@ przekazujący odebrane polecenia do tpmd.\
 %setup -q -n %{pname}-%{version}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 # separate kernel module from userspace build
 echo > tpmd_dev/CMakeLists.txt
diff --git a/linux-4.1.patch b/linux-4.1.patch
new file mode 100644
index 0000000..ffa7446
--- /dev/null
+++ b/linux-4.1.patch
@@ -0,0 +1,14 @@
+--- tpm_emulator-0.7.4/tpmd_dev/linux/tpmd_dev.c~	2015-07-03 20:04:49.000000000 +0200
++++ tpm_emulator-0.7.4/tpmd_dev/linux/tpmd_dev.c	2015-07-04 15:11:47.916586982 +0200
+@@ -116,7 +116,11 @@
+ #else
+   iov_iter_init(&msg.msg_iter, WRITE, &iov, 1, 1);
+ #endif
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
+   res = sock_sendmsg(tpmd_sock, &msg, in_size);
++#else
++  res = sock_sendmsg(tpmd_sock, &msg);
++#endif
+   if (res < 0) {
+     error("sock_sendmsg() failed: %d\n", res);
+     return res;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/tpm_emulator.git/commitdiff/3ead4e65ef65a05c4ff4d89655313646ff7a66b2



More information about the pld-cvs-commit mailing list