X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Flttng.h;h=f0be224b53c1b2343c2e34961bf7a5f18dd3982c;hb=73e0d9449ffd250dfe241737a962758674b6b1aa;hp=18dec2a8acfbf4da2eb07a63bb3174107f4a5509;hpb=f46b2ce6671c1c59d1e0f212f2020f2e26ca9929;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 */