diff --git a/src/pkcs11/pkcs11-spy.c b/src/pkcs11/pkcs11-spy.c index 49a6116c..1aed6389 100644 --- a/src/pkcs11/pkcs11-spy.c +++ b/src/pkcs11/pkcs11-spy.c @@ -256,7 +256,7 @@ enter(const char *function) gettimeofday (&tv, NULL); tm = localtime (&tv.tv_sec); strftime (time_string, sizeof(time_string), "%F %H:%M:%S", tm); - fprintf(spy_output, "%s.%03ld\n", time_string, tv.tv_usec / 1000); + fprintf(spy_output, "%s.%03ld\n", time_string, (long)tv.tv_usec / 1000); #endif }