summaryrefslogtreecommitdiffstats
path: root/network/guacamole-server/uuid.patch
diff options
context:
space:
mode:
author Zhu Qun-Ying <zhu.qunying@gmail.com>2015-08-11 12:00:32 +0700
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2015-08-11 23:25:26 +0700
commit9b755adec9858478b89e1497d1d00ee4b3bb7d54 (patch)
tree5a61ea8671847dc742c48ead52904b706c67da11 /network/guacamole-server/uuid.patch
parent3788ab1d6d0a02a6accf9f403aab5d5e93a8b6aa (diff)
downloadslackbuilds-9b755adec9858478b89e1497d1d00ee4b3bb7d54.tar.gz
slackbuilds-9b755adec9858478b89e1497d1d00ee4b3bb7d54.tar.xz
network/guacamole-server: Added (Guacamole server).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/guacamole-server/uuid.patch')
-rw-r--r--network/guacamole-server/uuid.patch75
1 files changed, 75 insertions, 0 deletions
diff --git a/network/guacamole-server/uuid.patch b/network/guacamole-server/uuid.patch
new file mode 100644
index 0000000000..cd82c2e6b0
--- /dev/null
+++ b/network/guacamole-server/uuid.patch
@@ -0,0 +1,75 @@
+--- guacamole-server-0.9.7/configure.ac 2015-06-08 17:35:23.000000000 -0700
++++ guacamole-server-0.9.7-new/configure.ac 2015-06-18 15:03:22.424072017 -0700
+@@ -64,19 +64,25 @@
+
+ # OSSP UUID
+ AC_CHECK_LIB([ossp-uuid], [uuid_make], [UUID_LIBS=-lossp-uuid],
+- AC_CHECK_LIB([uuid], [uuid_make], [UUID_LIBS=-luuid],
++ AC_CHECK_LIB([uuid], [uuid_generate], [UUID_LIBS=-luuid],
+ AC_MSG_ERROR("The OSSP UUID library is required")))
+
+ # Check for and validate OSSP uuid.h header
+-AC_CHECK_HEADERS([ossp/uuid.h])
+-AC_CHECK_DECL([uuid_make],,
+- AC_MSG_ERROR("No OSSP uuid.h found in include path"),
++AC_CHECK_HEADERS([ossp/uuid.h], [uuid/uuid.h])
++AC_CHECK_DECL([uuid_make],, ,
+ [#ifdef HAVE_OSSP_UUID_H
+ #include <ossp/uuid.h>
+ #else
+ #include <uuid.h>
+ #endif
+ ])
++AC_CHECK_DECL([uuid_generate],, ,
++ [#ifdef HAVE_OSSP_UUID_H
++ #include <ossp/uuid.h>
++ #else
++ #include <uuid/uuid.h>
++ #endif
++ ])
+
+ # cunit
+ AC_CHECK_LIB([cunit], [CU_run_test], [CUNIT_LIBS=-lcunit])
+--- guacamole-server-0.9.7/src/libguac/client.c 2015-05-29 15:29:19.000000000 -0700
++++ guacamole-server-0.9.7-new/src/libguac/client.c 2015-06-18 14:58:43.163055905 -0700
+@@ -36,7 +36,7 @@
+ #ifdef HAVE_OSSP_UUID_H
+ #include <ossp/uuid.h>
+ #else
+-#include <uuid.h>
++#include <uuid/uuid.h>
+ #endif
+
+ #include <stdarg.h>
+@@ -134,8 +134,8 @@
+
+ char* buffer;
+ char* identifier;
++#ifdef HAVE_OSSP_UUID_H
+ size_t identifier_length;
+-
+ uuid_t* uuid;
+
+ /* Attempt to create UUID object */
+@@ -175,6 +175,21 @@
+ }
+
+ uuid_destroy(uuid);
++#else
++ uuid_t uuid;
++#define UUID_LEN_STR 36
++
++ buffer = malloc (UUID_LEN_STR + 2);
++ if (buffer == NULL) {
++ guac_error = GUAC_STATUS_NO_MEMORY;
++ guac_error_message = "Could not allocate memory for connection ID";
++ return NULL;
++ }
++ identifier = buffer + 1;
++
++ uuid_generate (uuid);
++ uuid_unparse (uuid, identifier);
++#endif
+
+ buffer[0] = '$';
+ buffer[UUID_LEN_STR + 1] = '\0';