Skip to contentSkip to conversation

perf tui build fix for slang <= 2.0.6

GIT PULL New Arnaldo Carvalho de Melo 2 participants 3 messages May 18, 2010 perf events

lore
Share & tools
lore
#0 lore raw

Arnaldo Carvalho de Melo (1):
perf tui: Fix build problem with slang <= 2.0.6

 tools/perf/util/newt.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
#1 lore raw

PATCH 1/1 perf tui: Fix build problem with slang <= 2.0.6

From: Arnaldo Carvalho de Melo <[email protected]>

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.

Cc Frédéric Weisbecker <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Tom Zanussi <[email protected]>

LKML-Reference: <new-submission>

---
 tools/perf/util/newt.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
tools/perf/util/newt.c +9 -1
index ccb7c5b..9338d06 100644
@@ -1,7 +1,15 @@
 #define _GNU_SOURCE
 #include <stdio.h>
 #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 <stdlib.h>
 #include <newt.h>
Signature · 1 line
1.6.2.5
#2 lore raw
In reply to Arnaldo Carvalho de Melo
Quoted 5 lines · Arnaldo Carvalho de Melo

Arnaldo Carvalho de Melo (1):
perf tui: Fix build problem with slang <= 2.0.6

 tools/perf/util/newt.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

Pulled, thanks Arnaldo!

Ingo