On 16. feb. 2011, at 18.06, Paul Lindner wrote:

> Thanks!  I was going to fix this today but you beat me to it..
> 
> ccing memcached in hopes that it will get incorporated upstream...
> 

I tried to apply the patch today, but it failed (probably due to my poor 
removal of "> ". Anyway. I contacted Joe and he said that the fix broke one of 
the tests, so you may beat him to it? Do you got a fix?

Cheers,

Trond



> On Wed, Feb 16, 2011 at 8:57 AM, jorton <[email protected]> wrote:
> commit 0c09c03f987e192c5499d2e90a0da64394859ce1
> Author: Joe Orton <[email protected]>
> Date:   Wed Feb 16 16:57:13 2011 +0000
> 
>    - fix build
> 
>  memcached-1.4.5-warnings.patch |   30 +++++++++++++++++++
>  memcached.fc                   |    2 -
>  memcached.if                   |    1 -
>  memcached.spec                 |    7 ++++-
>  memcached.te                   |   61 
> ----------------------------------------
>  5 files changed, 36 insertions(+), 65 deletions(-)
> ---
> diff --git a/memcached-1.4.5-warnings.patch b/memcached-1.4.5-warnings.patch
> new file mode 100644
> index 0000000..1be53fe
> --- /dev/null
> +++ b/memcached-1.4.5-warnings.patch
> @@ -0,0 +1,30 @@
> +--- memcached-1.4.5/items.c.warnings
> ++++ memcached-1.4.5/items.c
> +@@ -449,10 +449,8 @@ void do_item_stats_sizes(ADD_STAT add_st
> +         /* write the buffer */
> +         for (i = 0; i < num_buckets; i++) {
> +             if (histogram[i] != 0) {
> +-                char key[8];
> +-                int klen = 0;
> +-                klen = snprintf(key, sizeof(key), "%d", i * 32);
> +-                assert(klen < sizeof(key));
> ++                char key[12];
> ++                snprintf(key, sizeof(key), "%d", i * 32);
> +                 APPEND_STAT(key, "%u", histogram[i]);
> +             }
> +         }
> +--- memcached-1.4.5/memcached.c.warnings
> ++++ memcached-1.4.5/memcached.c
> +@@ -4662,9 +4662,9 @@ int main (int argc, char **argv) {
> +
> +         /* create the UDP listening socket and bind it */
> +         errno = 0;
> +-        if (settings.udpport && server_socket(settings.udpport, 
> udp_transport,
> +-                                              portnumber_file)) {
> +-            vperror("failed to listen on UDP port %d", settings.udpport);
> ++        if (udp_port && server_socket(udp_port, udp_transport,
> ++                                      portnumber_file)) {
> ++            vperror("failed to listen on UDP port %d", udp_port);
> +             exit(EX_OSERR);
> +         }
> +
> diff --git a/memcached.spec b/memcached.spec
> index ab5e454..18a36de 100644
> --- a/memcached.spec
> +++ b/memcached.spec
> @@ -3,7 +3,7 @@
> 
>  Name:           memcached
>  Version:        1.4.5
> -Release:        6%{?dist}
> +Release:        7%{?dist}
>  Epoch:         0
>  Summary:        High Performance, Distributed Memory Object Cache
> 
> @@ -18,6 +18,7 @@ Source1:        memcached.sysv
>  # Patches
>  # From http://code.google.com/p/memcached/issues/detail?id=60
>  Patch001: memcached-1.4.5-issue60.diff
> +Patch002: memcached-1.4.5-warnings.patch
> 
>  # Fixes
> 
> @@ -53,6 +54,7 @@ memcached binary include files.
>  %prep
>  %setup -q
>  %patch001 -p1
> +%patch002 -p1 -b .warnings
> 
>  %build
>  %configure
> @@ -147,6 +149,9 @@ exit 0
>  %{_includedir}/memcached/*
> 
>  %changelog
> +* Wed Feb 16 2011 Joe Orton <[email protected]> - 0:1.4.5-7
> +- fix build
> +
>  * Mon Feb 14 2011 Paul Lindner <[email protected]> - 0:1.4.5-6
>  - Rebuild for updated libevent
> 
> 
> 
> 
> -- 
> Paul Lindner -- [email protected] -- linkedin.com/in/plindner

Reply via email to