# --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../libev/realloc.patch # Copyright (C) 2008 The OpenSDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- SDE-COPYRIGHT-NOTE-END --- --- ./ev.c.orig 2008-09-27 15:15:14.000000000 +0000 +++ ./ev.c 2008-09-27 15:17:31.000000000 +0000 @@ -399,7 +399,7 @@ } static void * -ev_realloc_emul (void *ptr, long size) +ev_realloc_emul (void *ptr, size_t size) { /* some systems, notably openbsd and darwin, fail to properly * implement realloc (x, 0) (as required by both ansi c-98 and @@ -413,10 +413,10 @@ return 0; } -static void *(*alloc)(void *ptr, long size) = ev_realloc_emul; +static void *(*alloc)(void *ptr, size_t size) = ev_realloc_emul; void -ev_set_allocator (void *(*cb)(void *ptr, long size)) +ev_set_allocator (void *(*cb)(void *ptr, size_t size)) { alloc = cb; } --- ./ev.h.orig 2008-09-27 15:15:10.000000000 +0000 +++ ./ev.h 2008-09-27 15:15:56.000000000 +0000 @@ -415,7 +415,7 @@ * or take some potentially destructive action. * The default is your system realloc function. */ -void ev_set_allocator (void *(*cb)(void *ptr, long size)); +void ev_set_allocator (void *(*cb)(void *ptr, size_t size)); /* set the callback function to call on a * retryable syscall error