You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/12/25 20:07:18 UTC

[incubator-nuttx] 02/02: signal: fix compile break in c++

This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit f508d80c3dcfd85b157b0f0350ec7c42244984ed
Author: dongjiuzhu <do...@xiaomi.com>
AuthorDate: Fri Nov 27 15:39:10 2020 +0800

    signal: fix compile break in c++
    
    nuttx.rel: In function `__metal_sleep_usec':
    nuttx/include/metal/system/nuttx/sleep.h:27: undefined reference to `nxsig_usleep(unsigned int)'
    collect2: error: ld returned 1 exit status
    
    Change-Id: I9dd2ed0a72d144bb152dc3753e7f9a6695dfb2d4
    Signed-off-by: dongjiuzhu <do...@xiaomi.com>
---
 include/nuttx/signal.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/nuttx/signal.h b/include/nuttx/signal.h
index f8f80d3..04e38ca 100644
--- a/include/nuttx/signal.h
+++ b/include/nuttx/signal.h
@@ -54,6 +54,11 @@ struct sigwork_s
   sigev_notify_function_t func; /* Notification function */
 };
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 /****************************************************************************
  * Public Function Prototypes
  ****************************************************************************/
@@ -556,4 +561,8 @@ void nxsig_cancel_notification(FAR struct sigwork_s *work);
   #define nxsig_cancel_notification(work) (void)(work)
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __INCLUDE_NUTTX_SIGNAL_H */