X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;ds=sidebyside;f=wrapper%2Fuuid.h;fp=wrapper%2Fuuid.h;h=74946e23adc52993ef0cbcffbaea1ce4bbd5e7f4;hb=a70082545931d638aca82b7c4f5253f1880d3c25;hp=0000000000000000000000000000000000000000;hpb=9cc9518e7e2401b47d1f8e4696c6d907d57b6a01;p=lttng-modules.git diff --git a/wrapper/uuid.h b/wrapper/uuid.h new file mode 100644 index 00000000..74946e23 --- /dev/null +++ b/wrapper/uuid.h @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) + * + * wrapper/uuid.h + * + * Copyright (C) 2020 Mathieu Desnoyers + */ + +#ifndef _LTTNG_WRAPPER_UUID_H +#define _LTTNG_WRAPPER_UUID_H + +#include +#include + +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) +static inline +void lttng_guid_gen(guid_t *u) +{ + return guid_gen(u); +} +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */ +static inline +void lttng_guid_gen(guid_t *u) +{ + return uuid_le_gen(u); +} +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */ + +#endif /* _LTTNG_WRAPPER_UUID_H */