Hello!
NetBSD has its own UUID API, which is slightly different, see patch below.
There's also no libuuid, all functions are in libc, but I'm not sure how to fix it with cmake right away. I'm removing "-luuid" flag with compiler wrapper (we have this kind of functionality in pkgsrc).
Use uuidgen(2) on NetBSD.
--- unix/plugins/UUIDPlugin/sqUnixUUID.c.orig 2009-08-26 22:12:10.000000000 +0400 +++ unix/plugins/UUIDPlugin/sqUnixUUID.c 2011-01-18 01:02:30.000000000 +0300 @@ -1,4 +1,8 @@ #include "config.h" +#if defined(__NetBSD__) +#include <sys/types.h> +#include <sys/uuid.h> +#endif #include <uuid.h> #include "sq.h"
@@ -15,7 +19,11 @@ int MakeUUID(char *location) { uuid_t uuid; +#if defined(__NetBSD__) + uuidgen(&uuid, 1); +#else uuid_generate(uuid); +#endif memcpy((void *)location, (void *)&uuid, sizeof(uuid)); return 1; }
Aleksej, thank you!
I have also added this information to the UUID bug report: http://bugs.squeak.org/view.php?id=7358
Dave
On Thu, Jan 20, 2011 at 04:22:25AM +0300, Aleksej Saushev wrote:
Hello!
NetBSD has its own UUID API, which is slightly different, see patch below.
There's also no libuuid, all functions are in libc, but I'm not sure how to fix it with cmake right away. I'm removing "-luuid" flag with compiler wrapper (we have this kind of functionality in pkgsrc).
Use uuidgen(2) on NetBSD.
--- unix/plugins/UUIDPlugin/sqUnixUUID.c.orig 2009-08-26 22:12:10.000000000 +0400 +++ unix/plugins/UUIDPlugin/sqUnixUUID.c 2011-01-18 01:02:30.000000000 +0300 @@ -1,4 +1,8 @@ #include "config.h" +#if defined(__NetBSD__) +#include <sys/types.h> +#include <sys/uuid.h> +#endif #include <uuid.h> #include "sq.h"
@@ -15,7 +19,11 @@ int MakeUUID(char *location) { uuid_t uuid; +#if defined(__NetBSD__)
- uuidgen(&uuid, 1);
+#else uuid_generate(uuid); +#endif memcpy((void *)location, (void *)&uuid, sizeof(uuid)); return 1; }
-- HE CE3OH...
vm-dev@lists.squeakfoundation.org