X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-ust-uuid.h;h=b7d94e707f9355c774b34f5b92e4feff08ce548d;hb=6ba6fd60507f8e045bdc4f1be14e9d99c6a15f7f;hp=418eb92081ed9c504bb10b3f4697686b1a3d8eda;hpb=9501d22f55b3a23f382f631c99b2325d1419b5da;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ust-uuid.h b/liblttng-ust/lttng-ust-uuid.h index 418eb920..b7d94e70 100644 --- a/liblttng-ust/lttng-ust-uuid.h +++ b/liblttng-ust/lttng-ust-uuid.h @@ -1,54 +1,13 @@ -#ifndef _LTTNG_UST_UUID_H -#define _LTTNG_UST_UUID_H - /* - * Copyright (C) 2011 Mathieu Desnoyers - * - * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED - * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. + * SPDX-License-Identifier: MIT * - * Permission is hereby granted to use or copy this program - * for any purpose, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - */ - -#include -#include /* For LTTNG_UST_UUID_LEN */ -/* - * Includes final \0. + * Copyright (C) 2011 Mathieu Desnoyers */ -#define LTTNG_UST_UUID_STR_LEN 37 -#ifdef LTTNG_UST_HAVE_LIBUUID -#include - -static inline -int lttng_ust_uuid_generate(unsigned char *uuid_out) -{ - uuid_generate(uuid_out); - return 0; -} - -#elif defined(LTTNG_UST_HAVE_LIBC_UUID) -#include -#include - -static inline -int lttng_ust_uuid_generate(unsigned char *uuid_out) -{ - uint32_t status; - - uuid_create((uuid_t *) uuid_out, &status); - if (status == uuid_s_ok) - return 0; - else - return -1; -} +#ifndef _LTTNG_UST_UUID_H +#define _LTTNG_UST_UUID_H -#else -#error "LTTng-UST needs to have a UUID generator configured." -#endif +#include /* For LTTNG_UST_UUID_LEN */ +#include #endif /* _LTTNG_UST_UUID_H */