From mboxrd@z Thu Jan 1 00:00:00 1970 From: dgoulet@efficios.com (David Goulet) Date: Tue, 11 Feb 2014 16:50:59 -0500 Subject: [lttng-dev] [PATCH lttng-tools v2] Fix: Define __STDC_LIMIT_MACROS to fix C++ builds In-Reply-To: <1392048262-17049-1-git-send-email-jeremie.galarneau@efficios.com> References: <2121067902.21017.1391874228506.JavaMail.zimbra@efficios.com> <1392048262-17049-1-git-send-email-jeremie.galarneau@efficios.com> Message-ID: <20140211215059.GD9564@thessa> Merged! Backported to stable-2.4 and 2.3 On 10 Feb (11:04:22), J?r?mie Galarneau wrote: > Necessary to include the fixed-width type limits on glibc versions > older than 2.18 when building with a C++ compiler. > > Signed-off-by: J?r?mie Galarneau > --- > include/lttng/lttng.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/include/lttng/lttng.h b/include/lttng/lttng.h > index 18dec2a..f0be224 100644 > --- a/include/lttng/lttng.h > +++ b/include/lttng/lttng.h > @@ -23,7 +23,17 @@ > #define LTTNG_H > > #include > +/* > + * Necessary to include the fixed width type limits on glibc versions older > + * than 2.18 when building with a C++ compiler. > + */ > +#ifndef __STDC_LIMIT_MACROS > +#define __STDC_LIMIT_MACROS > +#include > +#undef __STDC_LIMIT_MACROS > +#else /* #ifndef __STDC_LIMIT_MACROS */ > #include > +#endif /* #else #ifndef __STDC_LIMIT_MACROS */ > #include > > /* Error codes that can be returned by API calls */ > -- > 1.8.5.4 > > > _______________________________________________ > lttng-dev mailing list > lttng-dev at lists.lttng.org > http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 603 bytes Desc: Digital signature URL: