From 4260c717011d50519f90bc256c39372252fb1542 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 18:42:02 +0100 Subject: [PATCH] added patch for gcc 5 [release 0.3.13-3mamba;Sat Aug 20 2016] --- trousers-0.3.13-gcc-5.patch | 77 +++++++++++++++++++++++++++++++++ trousers-0.3.13-gcc-6.1.0.patch | 28 ------------ trousers.spec | 8 +++- 3 files changed, 83 insertions(+), 30 deletions(-) create mode 100644 trousers-0.3.13-gcc-5.patch delete mode 100644 trousers-0.3.13-gcc-6.1.0.patch diff --git a/trousers-0.3.13-gcc-5.patch b/trousers-0.3.13-gcc-5.patch new file mode 100644 index 0000000..7ae6143 --- /dev/null +++ b/trousers-0.3.13-gcc-5.patch @@ -0,0 +1,77 @@ +--- a/src/include/tcsps.h ++++ b/src/include/tcsps.h +@@ -23,13 +23,8 @@ int get_file(); + int put_file(int); + void close_file(int); + void ps_destroy(); +-#ifdef SOLARIS +-TSS_RESULT read_data(int, void *, UINT32); +-TSS_RESULT write_data(int, void *, UINT32); +-#else +-inline TSS_RESULT read_data(int, void *, UINT32); +-inline TSS_RESULT write_data(int, void *, UINT32); +-#endif ++TSS_RESULT read_data(int, void *, UINT32); ++TSS_RESULT write_data(int, void *, UINT32); + int write_key_init(int, UINT32, UINT32, UINT32); + TSS_RESULT cache_key(UINT32, UINT16, TSS_UUID *, TSS_UUID *, UINT16, UINT32, UINT32); + TSS_RESULT UnloadBlob_KEY_PS(UINT16 *, BYTE *, TSS_KEY *); +--- a/src/include/tspps.h ++++ b/src/include/tspps.h +@@ -18,8 +18,8 @@ + + TSS_RESULT get_file(int *); + int put_file(int); +-inline TSS_RESULT read_data(int, void *, UINT32); +-inline TSS_RESULT write_data(int, void *, UINT32); ++TSS_RESULT read_data(int, void *, UINT32); ++TSS_RESULT write_data(int, void *, UINT32); + UINT32 psfile_get_num_keys(int); + TSS_RESULT psfile_get_parent_uuid_by_uuid(int, TSS_UUID *, TSS_UUID *); + TSS_RESULT psfile_remove_key_by_uuid(int, TSS_UUID *); +--- a/src/tcs/ps/ps_utils.c ++++ b/src/tcs/ps/ps_utils.c +@@ -42,11 +42,7 @@ + struct key_disk_cache *key_disk_cache_head = NULL; + + +-#ifdef SOLARIS + TSS_RESULT +-#else +-inline TSS_RESULT +-#endif + read_data(int fd, void *data, UINT32 size) + { + int rc; +@@ -64,11 +60,7 @@ read_data(int fd, void *data, UINT32 size) + } + + +-#ifdef SOLARIS + TSS_RESULT +-#else +-inline TSS_RESULT +-#endif + write_data(int fd, void *data, UINT32 size) + { + int rc; +--- a/src/tspi/ps/ps_utils.c ++++ b/src/tspi/ps/ps_utils.c +@@ -22,7 +22,7 @@ + #include "tspps.h" + #include "tsplog.h" + +-inline TSS_RESULT ++TSS_RESULT + read_data(int fd, void *data, UINT32 size) + { + int rc; +@@ -39,7 +39,7 @@ read_data(int fd, void *data, UINT32 size) + return TSS_SUCCESS; + } + +-inline TSS_RESULT ++TSS_RESULT + write_data(int fd, void *data, UINT32 size) + { + int rc; \ No newline at end of file diff --git a/trousers-0.3.13-gcc-6.1.0.patch b/trousers-0.3.13-gcc-6.1.0.patch deleted file mode 100644 index 55ea89d..0000000 --- a/trousers-0.3.13-gcc-6.1.0.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/src/tcs/ps/ps_utils.c b/src/tcs/ps/ps_utils.c -index 82838ab..1cbc1ce 100644 ---- a/src/tcs/ps/ps_utils.c -+++ b/src/tcs/ps/ps_utils.c -@@ -42,11 +42,7 @@ - struct key_disk_cache *key_disk_cache_head = NULL; - - --#ifdef SOLARIS - TSS_RESULT --#else --inline TSS_RESULT --#endif - read_data(int fd, void *data, UINT32 size) - { - int rc; -@@ -64,11 +60,7 @@ read_data(int fd, void *data, UINT32 size) - } - - --#ifdef SOLARIS - TSS_RESULT --#else --inline TSS_RESULT --#endif - write_data(int fd, void *data, UINT32 size) - { - int rc; diff --git a/trousers.spec b/trousers.spec index 76b5430..a4d5f03 100644 --- a/trousers.spec +++ b/trousers.spec @@ -1,7 +1,7 @@ %define majver %(echo %version | cut -d. -f1-3) Name: trousers Version: 0.3.13 -Release: 2mamba +Release: 3mamba Summary: An open-source TCG Software Stack implementation Group: System/Libraries Vendor: openmamba @@ -10,7 +10,7 @@ Packager: Silvan Calarco URL: http://sourceforge.net/projects/trousers/ Source: http://downloads.sourceforge.net/project/trousers/trousers/%{majver}/trousers-%{version}.tar.gz Source1: tcsd.service -Patch0: trousers-0.3.13-gcc-6.1.0.patch +Patch0: trousers-0.3.13-gcc-5.patch License: Common Public Attribution License 1.0 ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -35,6 +35,7 @@ This package contains libraries and header files for developing applications tha %prep %setup -q %patch0 -p1 +#%patch1 -p1 %build %configure @@ -75,6 +76,9 @@ install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/tcsd.service %doc ChangeLog README README.selinux TODO %changelog +* Sat Aug 20 2016 Silvan Calarco 0.3.13-3mamba +- added patch for gcc 5 + * Sun Jul 24 2016 Silvan Calarco 0.3.13-2mamba - rebuilt with libopenssl 1.0.2h