diff --git a/src/libopensc/log.c b/src/libopensc/log.c index 521d510c..00ed8142 100644 --- a/src/libopensc/log.c +++ b/src/libopensc/log.c @@ -84,7 +84,7 @@ void sc_do_log_va(sc_context_t *ctx, int level, const char *file, int line, cons gettimeofday (&tv, NULL); tm = localtime (&tv.tv_sec); strftime (time_string, sizeof(time_string), "%H:%M:%S", tm); - r = snprintf(p, left, "0x%lx %s.%03ld ", (unsigned long)pthread_self(), time_string, tv.tv_usec / 1000); + r = snprintf(p, left, "0x%lx %s.%03d ", (unsigned long)pthread_self(), time_string, tv.tv_usec / 1000); #endif p += r; left -= r;