X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Flttng.h;h=f0be224b53c1b2343c2e34961bf7a5f18dd3982c;hb=cde3e505b7948c15880114268534d21fb1f10a1c;hp=18dec2a8acfbf4da2eb07a63bb3174107f4a5509;hpb=b2064f542c84041bf0b991d7d83f9e85db8adc19;p=lttng-tools.git diff --git a/include/lttng/lttng.h b/include/lttng/lttng.h index 18dec2a8a..f0be224b5 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 */