Today we found out that the 32 bit build of opencryptoki
does not work any more. With commit
10f4766cd6782f3d15e42a985cdf909fe4c7762e in 2014-04-15
I allready fixed this build error. However, with commit
11c0fc68b873c9d2b06210ca09c50e43cc08583d at 2015-03-11
I fixed the warnings related to this code and by doing
so reintroduced the 31 bit build error :-(
However, here now is the ultimate fix which builds on
64 bit and 31 bit without any warnings.
Maybe consider building an opencryptoki 3.4.1 as all
distributions which build 31 bit code will run into
this issue. Thanks and sorry.

Signed-off-by: Harald Freudenberger <fre...@linux.vnet.ibm.com>

diff --git a/usr/lib/pkcs11/ep11_stdll/ep11_specific.c
b/usr/lib/pkcs11/ep11_stdll/ep11_specific.c
index ed599bc..15e948c 100644
--- a/usr/lib/pkcs11/ep11_stdll/ep11_specific.c
+++ b/usr/lib/pkcs11/ep11_stdll/ep11_specific.c
@@ -402,7 +402,11 @@ static ep11_target_t ep11_targets;
 #ifdef EP11_STANDALONE
 static uint64_t ep11tok_target = 0x0000000100000008ull;
 #else
+#ifdef __s390x__
 static uint64_t ep11tok_target = (uint64_t) &ep11_targets;
+#else
+#define ep11tok_target (uint64_t)(long)(&ep11_targets)
+#endif
 #endif
 
 /* */


------------------------------------------------------------------------------
_______________________________________________
Opencryptoki-tech mailing list
Opencryptoki-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech

Reply via email to