projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://git.lttng.org/lttng-tools
[lttng-tools.git]
/
src
/
common
/
compat
/
poll.h
diff --git
a/src/common/compat/poll.h
b/src/common/compat/poll.h
index ded35410d48dd3d7232608746e46f6d334dd7733..e3a13cedecfeda3768b2df2718ccf0e5af3b4d04 100644
(file)
--- a/
src/common/compat/poll.h
+++ b/
src/common/compat/poll.h
@@
-50,6
+50,7
@@
static inline void __lttng_poll_free(void *events)
*/
#ifdef HAVE_EPOLL
#include <sys/epoll.h>
*/
#ifdef HAVE_EPOLL
#include <sys/epoll.h>
+#include <stdio.h>
/* See man epoll(7) for this define path */
#define COMPAT_EPOLL_PROC_PATH "/proc/sys/fs/epoll/max_user_watches"
/* See man epoll(7) for this define path */
#define COMPAT_EPOLL_PROC_PATH "/proc/sys/fs/epoll/max_user_watches"
@@
-146,8
+147,13
@@
static inline void lttng_poll_reset(struct lttng_poll_event *events)
*/
static inline void lttng_poll_clean(struct lttng_poll_event *events)
{
*/
static inline void lttng_poll_clean(struct lttng_poll_event *events)
{
+ int ret;
+
if (events) {
if (events) {
- close(events->epfd);
+ ret = close(events->epfd);
+ if (ret) {
+ perror("close");
+ }
__lttng_poll_free((void *) events->events);
}
}
__lttng_poll_free((void *) events->events);
}
}
@@
-182,9
+188,11
@@
enum {
#if __linux__
LPOLLMSG = POLLMSG,
LPOLLRDHUP = POLLRDHUP,
#if __linux__
LPOLLMSG = POLLMSG,
LPOLLRDHUP = POLLRDHUP,
-#elif
__FreeBSD__
+#elif
defined(__FreeBSD__)
LPOLLMSG = 0,
LPOLLRDHUP = 0,
LPOLLMSG = 0,
LPOLLRDHUP = 0,
+#else
+#error "Please add support for your OS."
#endif /* __linux__ */
LPOLLERR = POLLERR,
LPOLLHUP = POLLHUP | POLLNVAL,
#endif /* __linux__ */
LPOLLERR = POLLERR,
LPOLLHUP = POLLHUP | POLLNVAL,
This page took
0.024251 seconds
and
4
git commands to generate.