[BACK]Return to patch-aa CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / devel / memcached / patches

File: [cvs.NetBSD.org] / pkgsrc / devel / memcached / patches / Attic / patch-aa (download)

Revision 1.9, Tue Dec 8 17:41:56 2015 UTC (2 years, 3 months ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2016Q4-base, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4
Branch point for: pkgsrc-2016Q4
Changes since 1.8: +19 -19 lines

Changes 1.4.25:
Automake improvements
Misc documentation fixes
Misc updates to startup scripts
lru_crawler enable blocks until ready (test failure)
Record and report on time spent in listen_disabled (time_in_listen_disabled_us)
Update manpage for -I command. Make it more clear
Fix display of settings.hot_lru_pct in stats settings
No longer edits the output of ps while processing arguments
No longer crashes when failing to give arguments to some start args
Fix memcached unable to bind to an ipv6 address
No longer attempts bind to same interface more than once
fixed libevent version check: add the missing 1.0.x version check
fix off-by-one in LRU crawler, causing rare segfault
remove another invalid assert(), fixes clang and pedantic compilation

$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 */
         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",