#include <stdlib.h>
#include <stdbool.h>
-#include <common/defaults.h>
-#include <common/error.h>
-#include <common/macros.h>
-#include <common/utils.h>
+#include <common/defaults.hpp>
+#include <common/error.hpp>
+#include <common/macros.hpp>
+#include <common/utils.hpp>
-#include "poll.h"
+#include "poll.hpp"
#if HAVE_EPOLL
goto error;
}
- ptr = realloc(array->events, new_size * sizeof(*ptr));
+ ptr = (struct pollfd *) realloc(array->events, new_size * sizeof(*ptr));
if (ptr == NULL) {
PERROR("realloc epoll add");
goto error;
wait = &events->wait;
/* This *must* be freed by using lttng_poll_free() */
- wait->events = zmalloc(size * sizeof(struct pollfd));
+ wait->events = (struct pollfd *) zmalloc(size * sizeof(struct pollfd));
if (wait->events == NULL) {
PERROR("zmalloc struct pollfd");
goto error;
wait->alloc_size = wait->init_size = size;
- current->events = zmalloc(size * sizeof(struct pollfd));
+ current->events = (struct pollfd *) zmalloc(size * sizeof(struct pollfd));
if (current->events == NULL) {
PERROR("zmalloc struct current pollfd");
goto error;