[patch] No "uuid_generate" function in NetBSD

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[patch] No "uuid_generate" function in NetBSD

Aleksej Saushev-2
 
  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...

attachment0 (496 bytes) Download Attachment