he, we made same change... you are going to see a conflict in blessed sources :)
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.
>