Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [lttng-dev] [PATCH lttng-tools] Fix: Define __STDC_LIMIT_MACROS to fix C++ builds
@ 2014-02-07 23:32 Jérémie Galarneau
  2014-02-08 15:43 ` Mathieu Desnoyers
  0 siblings, 1 reply; 6+ messages in thread
From: Jérémie Galarneau @ 2014-02-07 23:32 UTC (permalink / raw)


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 <jeremie.galarneau at efficios.com>
---
 include/lttng/lttng.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/lttng/lttng.h b/include/lttng/lttng.h
index 18dec2a..2d410fa 100644
--- a/include/lttng/lttng.h
+++ b/include/lttng/lttng.h
@@ -23,7 +23,13 @@
 #define LTTNG_H
 
 #include <limits.h>
+/*
+ * Necessary to include the fixed width type limits on glibc versions older
+ * than 2.18 when building with a C++ compiler.
+ */
+#define __STDC_LIMIT_MACROS
 #include <stdint.h>
+#undef __STDC_LIMIT_MACROS
 #include <sys/types.h>
 
 /* Error codes that can be returned by API calls */
-- 
1.8.5.2




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-02-11 21:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-07 23:32 [lttng-dev] [PATCH lttng-tools] Fix: Define __STDC_LIMIT_MACROS to fix C++ builds Jérémie Galarneau
2014-02-08 15:43 ` Mathieu Desnoyers
2014-02-10 16:04   ` [lttng-dev] [PATCH lttng-tools v2] " Jérémie Galarneau
2014-02-10 17:55     ` Mathieu Desnoyers
2014-02-11 21:50     ` David Goulet
2014-02-10 16:05   ` [lttng-dev] [PATCH lttng-tools] " Jérémie Galarneau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox