[Samba4] [FreeBSD] backtrace patch [1/1]

Timur I. Bakeyev timur at com.bat.ru
Mon Oct 8 02:13:31 GMT 2007


Hi!

Here is a small patch that allows to use backtrace() function to generate
stack traces on panic. There is an external, FreeBSD specific library, that
mimics behaviour of the glibc backtrace() and friends functions.

With regards,
Timur.
-------------- next part --------------
Index: lib/util/fault.m4
===================================================================
--- lib/util/fault.m4	(revision 25200)
+++ lib/util/fault.m4	(working copy)
@@ -1,2 +1,5 @@
-AC_CHECK_HEADER(execinfo.h)
-AC_CHECK_FUNCS(backtrace)
+AC_CHECK_HEADERS(execinfo.h)
+AC_SEARCH_LIBS_EXT(backtrace, [execinfo], EXECINFO_LIBS)
+AC_CHECK_FUNC_EXT(backtrace, $EXECINFO_LIBS)
+SMB_EXT_LIB(EXECINFO,[${EXECINFO_LIBS}])
+SMB_ENABLE(EXECINFO)


More information about the samba-technical mailing list