X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fcompat%2Fpoll.h;fp=src%2Fcommon%2Fcompat%2Fpoll.h;h=75de9ba5fcf0a3ea60cbc086c9c60df3d680f0be;hp=e2a424abe132d564769d69de28aba40b50512324;hb=7966af5763c4aaca39df9bbfa9277ff15715c720;hpb=3a5f70173aa04d11ccb22694d5d31a702cad33ab diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index e2a424abe..75de9ba5f 100644 --- a/src/common/compat/poll.h +++ b/src/common/compat/poll.h @@ -13,6 +13,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + /* * Used by lttng_poll_clean to free the events structure in a lttng_poll_event. */ @@ -21,6 +25,10 @@ static inline void __lttng_poll_free(void *events) free(events); } +#ifdef __cplusplus +} +#endif + /* * epoll(7) implementation. */ @@ -30,6 +38,10 @@ static inline void __lttng_poll_free(void *events) #include #include +#ifdef __cplusplus +extern "C" { +#endif + /* See man epoll(7) for this define path */ #define COMPAT_EPOLL_PROC_PATH "/proc/sys/fs/epoll/max_user_watches" @@ -208,6 +220,10 @@ static inline void lttng_poll_clean(struct lttng_poll_event *events) __lttng_poll_free((void *) events->events); } +#ifdef __cplusplus +} +#endif + #else /* HAVE_EPOLL */ /* * Fallback on poll(2) API @@ -226,6 +242,10 @@ static inline void lttng_poll_clean(struct lttng_poll_event *events) #include #include +#ifdef __cplusplus +extern "C" { +#endif + enum { /* Polling variables compatibility for poll */ LPOLLIN = POLLIN, @@ -377,6 +397,10 @@ static inline void lttng_poll_clean(struct lttng_poll_event *events) } } +#ifdef __cplusplus +} +#endif + #endif /* HAVE_EPOLL */ #endif /* _LTT_POLL_H */