[Vm-dev] [patch] No "uuid_generate" function in NetBSD

Aleksej Saushev asau at inbox.ru
Thu Jul 22 21:01:52 UTC 2010


  Hello!

There's no "uuid_generate" function in NetBSD, we have uuidgen(2),
you can check http://man.netbsd.org/
Perhaps you want something like this, or check for uuid_generate somehow
(I'm not fluent in cmake).

--- unix/plugins/UUIDPlugin/sqUnixUUID.c.orig	2010-04-12 00:02:15.000000000 +0400
+++ unix/plugins/UUIDPlugin/sqUnixUUID.c	2010-07-20 16:48:17.000000000 +0400
@@ -15,7 +15,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...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20100723/b1f98d14/attachment-0001.pgp


More information about the Vm-dev mailing list