summaryrefslogtreecommitdiff
path: root/src/uuid.cpp
diff options
context:
space:
mode:
authorMartin Lucina <martin@lucina.net>2012-01-23 09:00:29 +0100
committerMartin Lucina <martin@lucina.net>2012-01-23 09:00:29 +0100
commitba0336b4d129a9e261c95276f89640b3459176bf (patch)
treea488f7efb61a6950a462815062c3b0f007f40ff5 /src/uuid.cpp
parentc3363afa881b46f3df8a6b72ed15cfbac18f4713 (diff)
parent4016b657973bba87caf75168ba70aaa85d556487 (diff)
Merge commit 'upstream/2.1.11'
Diffstat (limited to 'src/uuid.cpp')
-rw-r--r--src/uuid.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/uuid.cpp b/src/uuid.cpp
index d8cc2e8..35d854f 100644
--- a/src/uuid.cpp
+++ b/src/uuid.cpp
@@ -44,14 +44,22 @@ const char *zmq::uuid_t::to_string ()
return (char*) string_buf;
}
-#elif defined ZMQ_HAVE_FREEBSD || defined ZMQ_HAVE_NETBSD
+#elif defined ZMQ_HAVE_FREEBSD || defined ZMQ_HAVE_NETBSD || (defined ZMQ_HAVE_HPUX && defined HAVE_LIBDCEKT)
#include <stdlib.h>
-#include <uuid.h>
+#ifdef ZMQ_HAVE_HPUX
+# include <dce/uuid.h>
+#else
+# include <uuid.h>
+#endif
zmq::uuid_t::uuid_t ()
{
+#ifdef ZMQ_HAVE_HPUX
+ unsigned32 status;
+#else
uint32_t status;
+#endif
uuid_create (&uuid, &status);
zmq_assert (status == uuid_s_ok);
uuid_to_string (&uuid, &string_buf, &status);
@@ -67,7 +75,7 @@ zmq::uuid_t::~uuid_t ()
const char *zmq::uuid_t::to_string ()
{
- return string_buf;
+ return (char*) string_buf;
}
#elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_SOLARIS ||\