[v3,07/15] net/nfp: build fix for musl libc

Message ID 20190313170657.16688-8-ncopa@alpinelinux.org (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series Build fixes for musl libc |

Checks

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

Commit Message

Natanael Copa March 13, 2019, 5:06 p.m. UTC
  Fixes following build error on systems without execinfo.h:

../drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c:19:10: fatal error: execinfo.h: No such file or directory
 #include <execinfo.h>
          ^~~~~~~~~~~~

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
 drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Alejandro Lucero March 21, 2019, 9:48 a.m. UTC | #1
On Wed, Mar 13, 2019 at 5:08 PM Natanael Copa <ncopa@alpinelinux.org> wrote:

> Fixes following build error on systems without execinfo.h:
>
> ../drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c:19:10: fatal error:
> execinfo.h: No such file or directory
>  #include <execinfo.h>
>           ^~~~~~~~~~~~
>
> Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
>

Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>


> ---
>  drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
> b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
> index 39bd48a83..93ee310f5 100644
> --- a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
> +++ b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
> @@ -16,7 +16,9 @@
>
>  #include <assert.h>
>  #include <stdio.h>
> +#if defined(RTE_BACKTRACE)
>  #include <execinfo.h>
> +#endif
>  #include <stdlib.h>
>  #include <unistd.h>
>  #include <stdint.h>
> --
> 2.21.0
>
>
  

Patch

diff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
index 39bd48a83..93ee310f5 100644
--- a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
+++ b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
@@ -16,7 +16,9 @@ 
 
 #include <assert.h>
 #include <stdio.h>
+#if defined(RTE_BACKTRACE)
 #include <execinfo.h>
+#endif
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdint.h>