You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2022/02/26 13:05:49 UTC

[incubator-nuttx] branch master updated: arch/sim: Don't include execinfo.h since cygwin doesn't support it

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

gnutt 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 f634ea2  arch/sim: Don't include execinfo.h since cygwin doesn't support it
f634ea2 is described below

commit f634ea24b56dccd6e17dee270fabbdfc158d282b
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sat Feb 26 13:50:19 2022 +0800

    arch/sim: Don't include execinfo.h since cygwin doesn't support it
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/sim/src/sim/up_hostmisc.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/sim/src/sim/up_hostmisc.c b/arch/sim/src/sim/up_hostmisc.c
index b7747ee..75b7e66 100644
--- a/arch/sim/src/sim/up_hostmisc.c
+++ b/arch/sim/src/sim/up_hostmisc.c
@@ -22,7 +22,6 @@
  * Included Files
  ****************************************************************************/
 
-#include <execinfo.h>
 #include <stdlib.h>
 
 #include "up_internal.h"
@@ -50,7 +49,10 @@ void host_abort(int status)
 
 int host_backtrace(void** array, int size)
 {
-  /* exit the simulation */
-
+#ifdef CONFIG_WINDOWS_CYGWIN
+  return 0;
+#else
+  extern int backtrace(void **array, int size);
   return backtrace(array, size);
+#endif
 }