X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=include%2Flttng%2Flttng.h;h=a918ff2f229230e6bbe9f3e583fbe3ef6810e9db;hb=1a447d12098fd1ce2d3fd2946cf225039c583b5f;hp=4ffffd84ff237bedddbf1bbc27c325c32136b521;hpb=66d6602f068448cc15f0eb699c7d030723885faf;p=lttng-tools.git diff --git a/include/lttng/lttng.h b/include/lttng/lttng.h index 4ffffd84f..a918ff2f2 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 */