fix: 'struct timex' removed upstream (v5.6)
[lttng-modules.git] / wrapper / time.h
CommitLineData
9f36eaed
MJ
1/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
2 *
06359dbe
MD
3 * wrapper/time.h
4 *
5 * Copyright (C) 2015 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
06359dbe
MD
6 */
7
9f36eaed
MJ
8#ifndef _LTTNG_WRAPPER_TIME_H
9#define _LTTNG_WRAPPER_TIME_H
10
06359dbe
MD
11#include <linux/version.h>
12#include <linux/time.h>
13
14#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
15
16static inline bool lttng_close_on_exec(int fd, const struct fdtable *fdt)
17{
18 return close_on_exec(fd, fdt);
19}
20
21#else
22
23static inline bool lttng_close_on_exec(int fd, const struct fdtable *fdt)
24{
25 return FD_ISSET(fd, fdt->close_on_exec);
26}
27
28#endif
29
30#endif /* _LTTNG_WRAPPER_TIME_H */
This page took 0.031211 seconds and 4 git commands to generate.