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