#define _GNU_SOURCE
#define _LGPL_SOURCE
+#include <fcntl.h>
#include <helper.h>
-#include <string.h>
#include <lttng/align.h>
#include <lttng/ust-elf.h>
-#include <sys/types.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <string.h>
#include <sys/stat.h>
-#include <fcntl.h>
+#include <sys/types.h>
#include <unistd.h>
-#include <stdbool.h>
+
#include <ust-fd.h>
+
#include "lttng-tracer-core.h"
#define BUF_LEN 4096
goto error;
}
+ /* Initialize fd field to -1. 0 is a valid fd number */
+ elf->fd = -1;
elf->path = strdup(path);
if (!elf->path) {