This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Use libbacktrace as libsanitizer's symbolizer
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>, iant at google dot com, gcc-patches at gcc dot gnu dot org
- Date: Tue, 19 Nov 2013 08:44:32 +0100
- Subject: Re: [PATCH] Use libbacktrace as libsanitizer's symbolizer
- Authentication-results: sourceware.org; auth=none
- References: <CAKOQZ8xJa2_ZUVoLnUeLnJAchi3sGiA767GRcW9ZgAaowoUDjA at mail dot gmail dot com> <201311190517 dot rAJ5Hfvd024907 at ignucius dot se dot axis dot com> <20131119070212 dot GC22514 at bubble dot grove dot modra dot org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Nov 19, 2013 at 05:32:12PM +1030, Alan Modra wrote:
> On Tue, Nov 19, 2013 at 06:17:41AM +0100, Hans-Peter Nilsson wrote:
> > In file included from /tmp/x/gcc/libbacktrace/atomic.c:37:
> > /tmp/x/gcc/libbacktrace/internal.h:182: error: expected declaration specifiers or '...' before 'off_t'
> > make[3]: *** [atomic.lo] Error 1
> >
> > brgds, H-P
> > PS. Host is Fedora 12, x86_64.
>
> Likewise on powerpc-linux. Fixed here by #include <sys/types.h> in
> atomic.c.
Given:
/* We assume that <sys/types.h> and "backtrace.h" have already been
included. */
comment at the start of internal.h, I've committed following fix as obvious.
All other libbacktrace source files that include internal.h include both
sys/types.h and backtrace.h before internal.h.
2013-11-19 Jakub Jelinek <jakub@redhat.com>
* atomic.c: Include sys/types.h.
--- libbacktrace/atomic.c.jj 2013-11-19 08:35:09.000000000 +0100
+++ libbacktrace/atomic.c 2013-11-19 08:42:15.390239574 +0100
@@ -32,6 +32,8 @@ POSSIBILITY OF SUCH DAMAGE. */
#include "config.h"
+#include <sys/types.h>
+
#include "backtrace.h"
#include "backtrace-supported.h"
#include "internal.h"
Jakub