X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fcompat%2Fcompat-poll.c;h=6d34a0e69cbba04d133430d11fbce0626612bad0;hp=4893768a098543815207c90283eb9591d97a3a4a;hb=6f04ed72990f6c72d16fd08d39feac0967da732e;hpb=53efb85a242809ed5ed21e9ab40effa696ecbc6f diff --git a/src/common/compat/compat-poll.c b/src/common/compat/compat-poll.c index 4893768a0..6d34a0e69 100644 --- a/src/common/compat/compat-poll.c +++ b/src/common/compat/compat-poll.c @@ -16,6 +16,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include @@ -126,7 +127,7 @@ int compat_poll_create(struct lttng_poll_event *events, int size) /* This *must* be freed by using lttng_poll_free() */ wait->events = zmalloc(size * sizeof(struct pollfd)); if (wait->events == NULL) { - perror("zmalloc struct pollfd"); + PERROR("zmalloc struct pollfd"); goto error; } @@ -134,7 +135,7 @@ int compat_poll_create(struct lttng_poll_event *events, int size) current->events = zmalloc(size * sizeof(struct pollfd)); if (current->events == NULL) { - perror("zmalloc struct current pollfd"); + PERROR("zmalloc struct current pollfd"); goto error; } @@ -278,7 +279,7 @@ int compat_poll_wait(struct lttng_poll_event *events, int timeout) ret = poll(events->wait.events, events->wait.nb_fd, timeout); if (ret < 0) { /* At this point, every error is fatal */ - perror("poll wait"); + PERROR("poll wait"); goto error; } @@ -305,7 +306,7 @@ void compat_poll_set_max_size(void) ret = getrlimit(RLIMIT_NOFILE, &lim); if (ret < 0) { - perror("getrlimit poll RLIMIT_NOFILE"); + PERROR("getrlimit poll RLIMIT_NOFILE"); return; }