* This wrapper provides a handle that is either a copy of a directory's path
* or a directory file descriptors, depending on the platform's capabilities.
*/
-#ifdef COMPAT_DIRFD
+#ifdef HAVE_DIRFD
+
+struct lttng_directory_handle;
+
+typedef void (*lttng_directory_handle_destroy_cb)(
+ struct lttng_directory_handle *handle, void *data);
+
struct lttng_directory_handle {
struct urcu_ref ref;
ino_t directory_inode;
int dirfd;
+ lttng_directory_handle_destroy_cb destroy_cb;
+ void *destroy_cb_data;
};
static inline