Discussion:
[PATCH] [PATCH] only include execinfo.h if crashtrace support is enabled
Peter Korsgaard
2012-01-02 13:49:40 UTC
Permalink
On systems without backtrace suport (E.G. uClibc depending on config),
execinfo.h might not be available, breaking the build.

Fix it by only including it if enabled.

Signed-off-by: Peter Korsgaard <jacmet-OfajU3CKLf1/***@public.gmane.org>
---
src/logging/nm-logging.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/logging/nm-logging.c b/src/logging/nm-logging.c
index ca6a709..26c8670 100644
--- a/src/logging/nm-logging.c
+++ b/src/logging/nm-logging.c
@@ -23,7 +23,6 @@

#include <dlfcn.h>
#include <syslog.h>
-#include <execinfo.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
--
1.7.7.1
Robert Schwebel
2012-01-03 08:45:20 UTC
Permalink
Post by Peter Korsgaard
On systems without backtrace suport (E.G. uClibc depending on config),
execinfo.h might not be available, breaking the build.
Fix it by only including it if enabled.
But the patch just removes the include...?

rsc
Post by Peter Korsgaard
---
src/logging/nm-logging.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/src/logging/nm-logging.c b/src/logging/nm-logging.c
index ca6a709..26c8670 100644
--- a/src/logging/nm-logging.c
+++ b/src/logging/nm-logging.c
@@ -23,7 +23,6 @@
#include <dlfcn.h>
#include <syslog.h>
-#include <execinfo.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
--
1.7.7.1
_______________________________________________
crossdev mailing list
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Peter Korsgaard
2012-01-03 08:54:11 UTC
Permalink
Post by Peter Korsgaard
On systems without backtrace suport (E.G. uClibc depending on config),
execinfo.h might not be available, breaking the build.
Fix it by only including it if enabled.
Robert> But the patch just removes the include...?

It's already included below in a conditional:

#ifdef ENABLE_CRASHTRACE
#include <execinfo.h>
#endif
--
Bye, Peter Korsgaard
Dan Williams
2012-01-05 17:51:33 UTC
Permalink
Post by Peter Korsgaard
On systems without backtrace suport (E.G. uClibc depending on config),
execinfo.h might not be available, breaking the build.
Fix it by only including it if enabled.
Applied, thanks!

Dan
Post by Peter Korsgaard
---
src/logging/nm-logging.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/src/logging/nm-logging.c b/src/logging/nm-logging.c
index ca6a709..26c8670 100644
--- a/src/logging/nm-logging.c
+++ b/src/logging/nm-logging.c
@@ -23,7 +23,6 @@
#include <dlfcn.h>
#include <syslog.h>
-#include <execinfo.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
Loading...