diff --git a/include/sys/epoll.h b/include/sys/epoll.h index 6ac9ba5315..60e1a3f404 100644 --- a/include/sys/epoll.h +++ b/include/sys/epoll.h @@ -99,6 +99,19 @@ struct epoll_event epoll_data_t data; }; +/**************************************************************************** + * 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 */