Browse Source

perf tui: Fix build problem with slang <= 2.0.6

slang versions <= 2.0.6 have a "#if HAVE_LONG_LONG" that breaks the
build if it isn't defined. Use the equivalent one that glibc has on
features.h.

Reported-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Arnaldo Carvalho de Melo 15 years ago
parent
commit
32ec6acfdc
1 changed files with 9 additions and 1 deletions
  1. 9 1
      tools/perf/util/newt.c

+ 9 - 1
tools/perf/util/newt.c

@@ -1,7 +1,15 @@
 #define _GNU_SOURCE
 #define _GNU_SOURCE
 #include <stdio.h>
 #include <stdio.h>
 #undef _GNU_SOURCE
 #undef _GNU_SOURCE
-
+/*
+ * slang versions <= 2.0.6 have a "#if HAVE_LONG_LONG" that breaks
+ * the build if it isn't defined. Use the equivalent one that glibc
+ * has on features.h.
+ */
+#include <features.h>
+#ifndef HAVE_LONG_LONG
+#define HAVE_LONG_LONG __GLIBC_HAVE_LONG_LONG
+#endif
 #include <slang.h>
 #include <slang.h>
 #include <stdlib.h>
 #include <stdlib.h>
 #include <newt.h>
 #include <newt.h>