diff -r 020a5b5aa510 -r 53895e9a4bbb ucx/utils.c --- a/ucx/utils.c Wed May 13 21:12:41 2015 +0200 +++ b/ucx/utils.c Tue May 19 10:46:32 2015 +0200 @@ -1,7 +1,7 @@ /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * - * Copyright 2014 Olaf Wintermann. All rights reserved. + * Copyright 2015 Olaf Wintermann. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -128,10 +128,12 @@ } int ucx_ptrcmp(void *ptr1, void *ptr2, void *data) { - if (ptr1 == ptr2) { + intptr_t p1 = (intptr_t) ptr1; + intptr_t p2 = (intptr_t) ptr2; + if (p1 == p2) { return 0; } else { - return ptr1 < ptr2 ? -1 : 1; + return p1 < p2 ? -1 : 1; } }