Commit 00d7d441 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Fix DCE uuid_create wrapper to work on FreeBSD and AIX.

* The previous version only worked on AIX.
parent e74fa927
...@@ -5,9 +5,10 @@ ...@@ -5,9 +5,10 @@
#define _XOPEN_SOURCE 600 #define _XOPEN_SOURCE 600
#include <errno.h> #include <errno.h>
#include <float.h>
#include <inttypes.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <float.h>
#include <sys/types.h> #include <sys/types.h>
#include "cdi.h" #include "cdi.h"
...@@ -182,9 +183,9 @@ typedef uint32_t u_int32_t; ...@@ -182,9 +183,9 @@ typedef uint32_t u_int32_t;
void void
create_uuid(unsigned char *uuid) create_uuid(unsigned char *uuid)
{ {
unsigned32 status; uint32_t status;
uuid_create((uuid_t *)uuid, &status); uuid_create((uuid_t *)uuid, &status);
if (status == -1) if (status != uuid_s_ok)
{ {
perror("uuid generation failed!"); perror("uuid generation failed!");
exit(1); exit(1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment