diff -ur ibmtpm832/src/Implementation.h ibmswtpm2-832/src/Implementation.h --- ibmtpm832/src/Implementation.h 2016-11-18 22:42:16.000000000 +0100 +++ ibmswtpm2-832/src/Implementation.h 2017-01-30 17:36:16.279264575 +0100 @@ -301,7 +301,11 @@ /* From Vendor-Specific: Table 7 - Defines for Implementation Values */ #define FIELD_UPGRADE_IMPLEMENTED NO #ifdef TPM_POSIX +#if defined(__LP64__) || defined(_LP64) #define RADIX_BITS 64 /* kgold */ +#else +#define RADIX_BITS 32 /* kgold */ +#endif #endif #ifdef TPM_WINDOWS #define RADIX_BITS 32 /* kgold */ diff -ur ibmtpm832/src/Clock.c ibmswtpm2-832/src/Clock.c --- ibmtpm832/src/Clock.c 2016-11-18 22:41:02.000000000 +0100 +++ ibmswtpm2-832/src/Clock.c 2017-01-30 17:55:23.251624384 +0100 @@ -164,7 +164,7 @@ clock_t timeDiff; uint64_t adjusted; /* TOP is a base line or reference point, and BOTTOM is the current scale factor. */ -# define TOP (CLOCKS_PER_SEC * CLOCK_NOMINAL) /* kgold */ +# define TOP ((uint64_t)CLOCKS_PER_SEC * CLOCK_NOMINAL) /* kgold */ /* # define BOTTOM ((uint64_t)s_adjustRate * CLOCKS_PER_SEC) */ # define BOTTOM ((uint64_t)s_adjustRate * CLOCKS_PER_SEC) // Save the value previously read from the system clock