1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
*
* wrapper/uuid.h
*
* Copyright (C) 2020 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*/
#ifndef _LTTNG_WRAPPER_UUID_H
#define _LTTNG_WRAPPER_UUID_H
#include <lttng/kernel-version.h>
#include <linux/uuid.h>
#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,7,0))
static inline
void lttng_guid_gen(guid_t *u)
{
return guid_gen(u);
}
#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,7,0)) */
typedef uuid_le guid_t;
static inline
void lttng_guid_gen(guid_t *u)
{
return uuid_le_gen(u);
}
#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,7,0)) */
#endif /* _LTTNG_WRAPPER_UUID_H */
|