blob: 26fc9585d702a9e7b7b796ed3983dc330e46689c (
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
38
|
$NetBSD: patch-aa,v 1.5 2015/01/20 10:28:53 wiz Exp $
Add UUID support for *BSD
https://bugzilla.gnome.org/show_bug.cgi?id=743234
--- src/network-light/upnp.c.orig 2013-10-20 11:15:48.000000000 +0000
+++ src/network-light/upnp.c
@@ -27,7 +27,11 @@
#include <string.h>
#include <gmodule.h>
#ifndef G_OS_WIN32
+#if defined(__NetBSD__) || defined(__DragonFly__) || defined(__FreeBSD__)
+#include <uuid.h>
+#else
#include <uuid/uuid.h>
+#endif
#else
#include <rpc.h>
typedef UUID uuid_t;
@@ -335,8 +339,18 @@ static void init_uuid ()
char *udn;
#ifndef G_OS_WIN32
+#if defined(__NetBSD__) || defined(__DragonFly__) || defined(__FreeBSD__)
+ {
+ char *myuuidstr;
+ uuid_create (&uuid_context, 0);
+ uuid_to_string (&uuid_context, &myuuidstr, 0);
+ strncpy (uuid, myuuidstr, sizeof(uuid));
+ free (myuuidstr);
+ }
+#else
uuid_generate (uuid_context);
uuid_unparse (uuid_context, uuid);
+#endif
#else
{
gchar *tmp_uuid;
|