summaryrefslogtreecommitdiffstats
path: root/package/lttng-babeltrace/lttng-babeltrace-02-fix-build-old-compilers.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/lttng-babeltrace/lttng-babeltrace-02-fix-build-old-compilers.patch')
-rw-r--r--package/lttng-babeltrace/lttng-babeltrace-02-fix-build-old-compilers.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/package/lttng-babeltrace/lttng-babeltrace-02-fix-build-old-compilers.patch b/package/lttng-babeltrace/lttng-babeltrace-02-fix-build-old-compilers.patch
new file mode 100644
index 000000000..b8f31be1e
--- /dev/null
+++ b/package/lttng-babeltrace/lttng-babeltrace-02-fix-build-old-compilers.patch
@@ -0,0 +1,27 @@
+Support old compilers
+
+Some old compilers do not use C99 as their default C language variant,
+for example gcc 4.3.x, which is used on some old machines. When such a
+compiler is used, by default, ULLONG_MAX is not visible. Adding
+-std=gnu99 is needed to make this definition visible.
+
+In autoconf speak, this translates into the need of using
+AC_PROC_CC_STDC instead of AC_PROG_CC. See
+http://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/C-Compiler.html
+for more details.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -17,7 +17,7 @@
+ AC_SYS_LARGEFILE
+
+ # Checks for programs.
+-AC_PROG_CC
++AC_PROG_CC_STDC
+ AC_PROG_MAKE_SET
+ LT_INIT
+ AC_PROG_YACC