blob: b76d8e771bc3443d2b89653c59a30f89271c71ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
$NetBSD: patch-ad,v 1.2 2009/08/18 18:31:18 hasso Exp $
--- libgupnp/gupnp-service.c.orig 2009-06-02 14:10:25.000000000 +0200
+++ libgupnp/gupnp-service.c
@@ -30,7 +30,11 @@
#include <gobject/gvaluecollector.h>
#include <gmodule.h>
#include <libsoup/soup-date.h>
+#if defined(__NetBSD__) || defined(__DragonFly__)
+#include <uuid.h>
+#else
#include <uuid/uuid.h>
+#endif
#include <string.h>
#include "gupnp-service.h"
#include "gupnp-root-device.h"
@@ -843,9 +847,19 @@ generate_sid (void)
{
uuid_t id;
char out[39];
-
+#if defined(__NetBSD__) || defined(__DragonFly__)
+ char *myout;
+#endif
+
+#if defined(__NetBSD__) || defined(__DragonFly__)
+ uuid_create(&id, 0);
+ uuid_to_string(&id, &myout, 0);
+ strncpy(out, myout, sizeof(out));
+ free(myout);
+#else
uuid_generate (id);
uuid_unparse (id, out);
+#endif
return g_strdup_printf ("uuid:%s", out);
}
|