* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#define _GNU_SOURCE
+#define _LGPL_SOURCE
#include <assert.h>
#include <inttypes.h>
#include <stdio.h>
if (!ha) {
return NULL;
}
- ha->flags = zmalloc(sizeof(*ha->flags));
+ ha->flags = zmalloc(sizeof(*ha->flags) * nr_types);
if (!ha->flags) {
goto error_flags;
}
last = state->last;
current = uatomic_read(&state->current);
- ret = clock_gettime(CLOCK_MONOTONIC, ¤t_time);
+ ret = lttng_clock_gettime(CLOCK_MONOTONIC, ¤t_time);
if (ret < 0) {
PERROR("Error reading time\n");
/* error */