Namespace kernel version macros
[lttng-modules.git] / wrapper / time.h
index 527615af71f2af0cc4259fcaedec66c0e150d1a3..bec5f984d8da574126254ac52c7908307a4490b6 100644 (file)
@@ -2,29 +2,21 @@
  *
  * wrapper/time.h
  *
- * Copyright (C) 2015 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2020 Michael Jeanson <mjeanson@efficios.com>
+ * Copyright (C) 2020 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
 #ifndef _LTTNG_WRAPPER_TIME_H
 #define _LTTNG_WRAPPER_TIME_H
 
-#include <linux/version.h>
-#include <linux/time.h>
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
-
-static inline bool lttng_close_on_exec(int fd, const struct fdtable *fdt)
-{
-       return close_on_exec(fd, fdt);
-}
-
-#else
-
-static inline bool lttng_close_on_exec(int fd, const struct fdtable *fdt)
-{
-       return FD_ISSET(fd, fdt->close_on_exec);
-}
+#include <lttng-kernel-version.h>
 
+/*
+ * Use 64bit timespec on kernels that have it, this makes 32bit arch
+ * y2038 compliant.
+ */
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,17,0))
+# define LTTNG_KERNEL_HAS_TIMESPEC64
 #endif
 
 #endif /* _LTTNG_WRAPPER_TIME_H */
This page took 0.028879 seconds and 4 git commands to generate.