[dpdk-dev,v2,3/3] eal: remove references to execinfo.h for musl

Message ID 1489395568-4664-4-git-send-email-wei.dai@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Wei Dai March 13, 2017, 8:59 a.m. UTC
  execinfo.h is not supported by musl now.
need to remove references to execinfo.h to
build DPDK with musl.

musl is an implementation of the userspace portion
of the standard library functionality described in
the ISO C and POSIX standards, plus common extensions.

Get more details about musl from
http://www.musl-libc.org

This also aplies to some other LIBC implementation which
doesn't support backtrace( ) and backtrace_symbols( ).

Signed-off-by: Wei Dai <wei.dai@intel.com>
---
 lib/librte_eal/linuxapp/eal/eal_debug.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Patch

diff --git a/lib/librte_eal/linuxapp/eal/eal_debug.c b/lib/librte_eal/linuxapp/eal/eal_debug.c
index 5fbc17c..3a9aee9 100644
--- a/lib/librte_eal/linuxapp/eal/eal_debug.c
+++ b/lib/librte_eal/linuxapp/eal/eal_debug.c
@@ -31,7 +31,9 @@ 
  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifdef RTE_EAL_ENABLE_BACKTRACE
 #include <execinfo.h>
+#endif
 #include <stdarg.h>
 #include <signal.h>
 #include <stdlib.h>
@@ -47,6 +49,7 @@ 
 /* dump the stack of the calling core */
 void rte_dump_stack(void)
 {
+#ifdef RTE_EAL_ENABLE_BACKTRACE
 	void *func[BACKTRACE_SIZE];
 	char **symb = NULL;
 	int size;
@@ -64,6 +67,7 @@  void rte_dump_stack(void)
 	}
 
 	free(symb);
+#endif
 }
 
 /* not implemented in this environment */