+#ifdef FD_ISSET /* For old kernels lacking close_on_exec() */
+static inline bool lttng_close_on_exec(int fd, const struct fdtable *fdt)
+{
+ return FD_ISSET(fd, fdt->close_on_exec);
+}
+#else
+static inline bool lttng_close_on_exec(int fd, const struct fdtable *fdt)
+{
+ return close_on_exec(fd, fdt);
+}
+#endif
+