X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fcompat%2Fcompat-epoll.c;h=9c2688d33e09c3c774b914b366226424504324e7;hb=707de922fab70af1b4238c33359b77d1ebd1ee34;hp=5d6153b64d075b5da4dc9881680be992e6018b6f;hpb=dbe23f452a025e8f42bdbb41e30a4a6257aa821c;p=lttng-tools.git diff --git a/src/common/compat/compat-epoll.c b/src/common/compat/compat-epoll.c index 5d6153b64..9c2688d33 100644 --- a/src/common/compat/compat-epoll.c +++ b/src/common/compat/compat-epoll.c @@ -15,7 +15,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include @@ -24,7 +23,6 @@ #include #include #include -#include #include #include @@ -78,8 +76,9 @@ int compat_epoll_create(struct lttng_poll_event *events, int size, int flags) } if (!poll_max_size) { - ERR("poll_max_size not initialized yet"); - goto error; + if (lttng_poll_set_max_size()) { + goto error; + } } /* Don't bust the limit here */ @@ -210,7 +209,6 @@ int compat_epoll_wait(struct lttng_poll_event *events, int timeout) ERR("Wrong arguments in compat_epoll_wait"); goto error; } - assert(events->nb_fd >= 0); if (events->nb_fd == 0) { errno = EINVAL;