added patch for gcc 5 [release 0.3.13-3mamba;Sat Aug 20 2016]

This commit is contained in:
Silvan Calarco 2024-01-05 18:42:02 +01:00
parent 4724af2373
commit 4260c71701
3 changed files with 83 additions and 30 deletions

View File

@ -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;

View File

@ -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;

View File

@ -1,7 +1,7 @@
%define majver %(echo %version | cut -d. -f1-3) %define majver %(echo %version | cut -d. -f1-3)
Name: trousers Name: trousers
Version: 0.3.13 Version: 0.3.13
Release: 2mamba Release: 3mamba
Summary: An open-source TCG Software Stack implementation Summary: An open-source TCG Software Stack implementation
Group: System/Libraries Group: System/Libraries
Vendor: openmamba Vendor: openmamba
@ -10,7 +10,7 @@ Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://sourceforge.net/projects/trousers/ URL: http://sourceforge.net/projects/trousers/
Source: http://downloads.sourceforge.net/project/trousers/trousers/%{majver}/trousers-%{version}.tar.gz Source: http://downloads.sourceforge.net/project/trousers/trousers/%{majver}/trousers-%{version}.tar.gz
Source1: tcsd.service 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 License: Common Public Attribution License 1.0
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
@ -35,6 +35,7 @@ This package contains libraries and header files for developing applications tha
%prep %prep
%setup -q %setup -q
%patch0 -p1 %patch0 -p1
#%patch1 -p1
%build %build
%configure %configure
@ -75,6 +76,9 @@ install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/tcsd.service
%doc ChangeLog README README.selinux TODO %doc ChangeLog README README.selinux TODO
%changelog %changelog
* Sat Aug 20 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.3.13-3mamba
- added patch for gcc 5
* Sun Jul 24 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.3.13-2mamba * Sun Jul 24 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.3.13-2mamba
- rebuilt with libopenssl 1.0.2h - rebuilt with libopenssl 1.0.2h