This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push: new 78005a4 sys/epoll: include-able from C++ files 78005a4 is described below commit 78005a4ba0edc3acc64ebea8fbc4cfab0089cccb Author: chao.an <anc...@xiaomi.com> AuthorDate: Thu Sep 17 15:32:53 2020 +0800 sys/epoll: include-able from C++ files Change-Id: Icc73be9de7a9217e33903243b0ecf1a9a596b381 Signed-off-by: chao.an <anc...@xiaomi.com> --- include/sys/epoll.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/sys/epoll.h b/include/sys/epoll.h index 6ac9ba5..60e1a3f 100644 --- a/include/sys/epoll.h +++ b/include/sys/epoll.h @@ -100,6 +100,19 @@ struct epoll_event }; /**************************************************************************** + * Public Data + ****************************************************************************/ + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** * Public Function Prototypes ****************************************************************************/ @@ -113,4 +126,9 @@ int epoll_pwait(int epfd, FAR struct epoll_event *evs, void epoll_close(int epfd); +#undef EXTERN +#if defined(__cplusplus) +} +#endif + #endif /* __INCLUDE_SYS_EPOLL_H */