You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.9 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../libev/realloc.patch
# Copyright (C) 2008 - 2013 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 ---
--- a/ev.c 2013-03-01 12:10:48.000000000 +0100
+++ b/ev.c 2013-08-08 16:55:06.144756967 +0200
@@ -1411,7 +1411,7 @@
}
static void *
-ev_realloc_emul (void *ptr, long size) EV_THROW
+ev_realloc_emul (void *ptr, size_t size) EV_THROW
{
/* some systems, notably openbsd and darwin, fail to properly
* implement realloc (x, 0) (as required by both ansi c-89 and
@@ -1427,10 +1427,10 @@
return 0;
}
-static void *(*alloc)(void *ptr, long size) EV_THROW = ev_realloc_emul;
+static void *(*alloc)(void *ptr, size_t size) EV_THROW = ev_realloc_emul;
void ecb_cold
-ev_set_allocator (void *(*cb)(void *ptr, long size) EV_THROW) EV_THROW
+ev_set_allocator (void *(*cb)(void *ptr, size_t size) EV_THROW) EV_THROW
{
alloc = cb;
}
--- a/ev.h 2013-03-01 12:05:29.000000000 +0100
+++ b/ev.h 2013-08-08 16:57:38.560245532 +0200
@@ -536,7 +536,7 @@
* or take some potentially destructive action.
* The default is your system realloc function.
*/
-EV_API_DECL void ev_set_allocator (void *(*cb)(void *ptr, long size) EV_THROW) EV_THROW;
+EV_API_DECL void ev_set_allocator (void *(*cb)(void *ptr, size_t size) EV_THROW) EV_THROW;
/* set the callback function to call on a
* retryable syscall error