On 20 July 2011 17:15, Esteban Lorenzano <estebanlm@gmail.com> wrote:
he, we made same change... you are going to see a conflict in blessed sources :)
No. i didn't committed it. I just put an obvious missing code path to see what's wrong there. So your's will be fine :)
El 20/07/2011, a las 11:54a.m., Igor Stasenko escribió:
I changed the MakeUUID in sqUnixUUID.c to look like following:
int MakeUUID(char *location) { Â uuid_t uuid;
#if defined(HAVE_UUIDGEN) Â uuidgen(&uuid, 1); #elif defined(HAVE_UUID_GENERATE) Â uuid_generate(uuid); #else #error "No uuid function provided" #endif
 memcpy((void *)location, (void *)&uuid, sizeof(uuid));  return 1; }
and during compiling cocoa vms it fails with error. And before change the code was looking like following:
int MakeUUID(char *location) { Â uuid_t uuid;
#if defined(HAVE_UUIDGEN) Â uuidgen(&uuid, 1); #elif defined(HAVE_UUID_GENERATE) Â uuid_generate(uuid); #endif
 memcpy((void *)location, (void *)&uuid, sizeof(uuid));  return 1; }
which means that if none HAVE_UUIDGEN or HAVE_UUID_GENERATE is defined, then there is nothing got called and memcpy then returns a random values on stack, copied from uuid to locaiton.
And first version of that file just contains :
int MakeUUID(char *location) { Â uuid_t uuid; Â uuid_generate(uuid); Â memcpy((void *)location, (void *)&uuid, sizeof(uuid)); Â return 1; }
and then changed to:
#if defined(__NetBSD__)  uuidgen(&uuid, 1); #else  uuid_generate(uuid); #endif
and then changed to:
#if defined(HAVE_UUIDGEN) Â uuidgen(&uuid, 1); #elif defined(HAVE_UUID_GENERATE) Â uuid_generate(uuid); #endif
Blame: Merge Levente's linux UUIDPlugin fix. Fix tickerSleepCycle decl in heartbeat. Restore -O2 optimization for the interpreter.
Author: Â Â Â eliot Date: 5 months ago Commit: Â Â Â 757297f62c32eaf2af7f26ce66aa6499df776749
-- Best regards, Igor Stasenko AKA sig.
-- Best regards, Igor Stasenko AKA sig.