]> git.pld-linux.org Git - packages/tpm_emulator.git/commitdiff
- fix building with linux 3.19 auto/th/tpm_emulator-0.7.4-13
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 30 Mar 2015 19:20:43 +0000 (21:20 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Mon, 30 Mar 2015 19:20:43 +0000 (21:20 +0200)
- rel 13

linux-3.19.patch [new file with mode: 0644]
tpm_emulator.spec

diff --git a/linux-3.19.patch b/linux-3.19.patch
new file mode 100644 (file)
index 0000000..f92ce8e
--- /dev/null
@@ -0,0 +1,37 @@
+--- tpm_emulator-0.7.4/tpmd_dev/linux/tpmd_dev.c~      2011-12-20 19:30:06.000000000 +0100
++++ tpm_emulator-0.7.4/tpmd_dev/linux/tpmd_dev.c       2015-03-30 21:19:18.288861679 +0200
+@@ -25,6 +25,8 @@
+ #include <linux/net.h>
+ #include <linux/un.h>
++#include <linux/version.h>
++
+ #include "config.h"
+ #define TPM_DEVICE_MINOR  224
+@@ -108,8 +108,12 @@
+   memset(&msg, 0, sizeof(msg));
+   iov.iov_base = (void*)in;
+   iov.iov_len = in_size;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
+   msg.msg_iov = &iov;
+   msg.msg_iovlen = 1;
++#else
++  iov_iter_init(&msg.msg_iter, WRITE, &iov, 1, 1);
++#endif
+   res = sock_sendmsg(tpmd_sock, &msg, in_size);
+   if (res < 0) {
+     error("sock_sendmsg() failed: %d\n", res);
+@@ -122,8 +126,12 @@
+   memset(&msg, 0, sizeof(msg));
+   iov.iov_base = (void*)tpm_response.data;
+   iov.iov_len = tpm_response.size;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
+   msg.msg_iov = &iov;
+   msg.msg_iovlen = 1;
++#else
++  iov_iter_init(&msg.msg_iter, READ, &iov, 1, 1);
++#endif
+   oldmm = get_fs();
+   set_fs(KERNEL_DS);
+   res = sock_recvmsg(tpmd_sock, &msg, tpm_response.size, 0);
index 0f5d53e858430f787b4fe9bfa88ebff66dbb14c0..5ffb1601c3f074e91ff31c8ea54f7f5426adc03f 100644 (file)
@@ -21,7 +21,7 @@ exit 1
 %define                _duplicate_files_terminate_build        0
 
 %define        pname   tpm_emulator
-%define        rel     12
+%define        rel     13
 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}
@@ -32,6 +32,7 @@ Group:                Applications/System
 Source0:       http://downloads.sourceforge.net/tpm-emulator.berlios/%{pname}-%{version}.tar.gz
 # Source0-md5: e26becb8a6a2b6695f6b3e8097593db8
 Patch0:                %{pname}-libdir.patch
+Patch1:                linux-3.19.patch
 URL:           http://tpm-emulator.berlios.de/
 BuildRequires: cmake >= 2.4
 BuildRequires: gmp-devel
@@ -122,6 +123,7 @@ przekazujący odebrane polecenia do tpmd.\
 %prep
 %setup -q -n %{pname}-%{version}
 %patch0 -p1
+%patch1 -p1
 
 # separate kernel module from userspace build
 echo > tpmd_dev/CMakeLists.txt
This page took 0.065193 seconds and 4 git commands to generate.