You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/09/19 02:52:04 UTC

[incubator-nuttx] branch master updated: sys/epoll: include-able from C++ files

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 <an...@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 <an...@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 */