mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-11 13:30:02 -04:00
35 lines
1.7 KiB
Plaintext
35 lines
1.7 KiB
Plaintext
$NetBSD: patch-aa,v 1.9 2015/12/08 17:41:56 adam Exp $
|
|
|
|
time_t changes
|
|
|
|
--- items.c.orig 2015-11-20 01:18:56.000000000 +0000
|
|
+++ items.c
|
|
@@ -460,9 +460,9 @@ char *item_cachedump(const unsigned int
|
|
/* Copy the key since it may not be null-terminated in the struct */
|
|
strncpy(key_temp, ITEM_key(it), it->nkey);
|
|
key_temp[it->nkey] = 0x00; /* terminate */
|
|
- len = snprintf(temp, sizeof(temp), "ITEM %s [%d b; %lu s]\r\n",
|
|
+ len = snprintf(temp, sizeof(temp), "ITEM %s [%d b; %jd s]\r\n",
|
|
key_temp, it->nbytes - 2,
|
|
- (unsigned long)it->exptime + process_started);
|
|
+ (intmax_t)it->exptime + process_started);
|
|
if (bufcurr + len + 6 > memlimit) /* 6 is END\r\n\0 */
|
|
break;
|
|
memcpy(buffer + bufcurr, temp, len);
|
|
@@ -576,13 +576,13 @@ void item_stats(ADD_STAT add_stats, void
|
|
if (settings.expirezero_does_not_evict)
|
|
APPEND_NUM_FMT_STAT(fmt, n, "number_noexp", "%u", lru_size_map[3]);
|
|
}
|
|
- APPEND_NUM_FMT_STAT(fmt, n, "age", "%u", age);
|
|
+ APPEND_NUM_FMT_STAT(fmt, n, "age", "%jd", age);
|
|
APPEND_NUM_FMT_STAT(fmt, n, "evicted",
|
|
"%llu", (unsigned long long)totals.evicted);
|
|
APPEND_NUM_FMT_STAT(fmt, n, "evicted_nonzero",
|
|
"%llu", (unsigned long long)totals.evicted_nonzero);
|
|
APPEND_NUM_FMT_STAT(fmt, n, "evicted_time",
|
|
- "%u", totals.evicted_time);
|
|
+ "%jd", totals.evicted_time);
|
|
APPEND_NUM_FMT_STAT(fmt, n, "outofmemory",
|
|
"%llu", (unsigned long long)totals.outofmemory);
|
|
APPEND_NUM_FMT_STAT(fmt, n, "tailrepairs",
|