summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--thread.c6
-rw-r--r--time.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/thread.c b/thread.c
index 5312648a57..3f6ec5a8d6 100644
--- a/thread.c
+++ b/thread.c
@@ -996,9 +996,9 @@ sleep_timeval(rb_thread_t *th, struct timeval tv, int spurious_check)
getclockofday(&tvn);
if (to.tv_sec < tvn.tv_sec) break;
if (to.tv_sec == tvn.tv_sec && to.tv_usec <= tvn.tv_usec) break;
- thread_debug("sleep_timeval: %ld.%.6ld > %ld.%.6ld\n",
- (long)to.tv_sec, (long)to.tv_usec,
- (long)tvn.tv_sec, (long)tvn.tv_usec);
+ thread_debug("sleep_timeval: %"PRI_TIMET_PREFIX"d.%.6ld > %"PRI_TIMET_PREFIX"d.%.6ld\n",
+ (time_t)to.tv_sec, (long)to.tv_usec,
+ (time_t)tvn.tv_sec, (long)tvn.tv_usec);
tv.tv_sec = to.tv_sec - tvn.tv_sec;
if ((tv.tv_usec = to.tv_usec - tvn.tv_usec) < 0) {
--tv.tv_sec;
diff --git a/time.c b/time.c
index 14f29118ac..a91ffa49b5 100644
--- a/time.c
+++ b/time.c
@@ -2794,7 +2794,7 @@ timegm_noleapsecond(struct tm *tm)
#endif
#ifdef DEBUG_GUESSRANGE
-#define DEBUG_REPORT_GUESSRANGE fprintf(stderr, "find time guess range: %ld - %ld : %lu\n", guess_lo, guess_hi, (unsigned_time_t)(guess_hi-guess_lo))
+#define DEBUG_REPORT_GUESSRANGE fprintf(stderr, "find time guess range: %ld - %ld : %"PRI_TIMET_PREFIX"u\n", guess_lo, guess_hi, (unsigned_time_t)(guess_hi-guess_lo))
#else
#define DEBUG_REPORT_GUESSRANGE
#endif