Skip to content

Commit

Permalink
perf trace/scripting: Fix compile error when libperl not installed
Browse files Browse the repository at this point in the history
When I added the xs callbacks into perf, I forgot to re-check
the no-libperl case. This patch fixes the undefined reference
error for that.

Reported-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1260153712.6564.4.camel@tropicana>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Tom Zanussi authored and Ingo Molnar committed Dec 7, 2009
1 parent f48f669 commit 3a9a0be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions tools/perf/util/trace-event-perl.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@

void xs_init(pTHX);

void boot_Perf__Trace__Context(pTHX_ CV *cv);
void boot_DynaLoader(pTHX_ CV *cv);

void xs_init(pTHX)
{
const char *file = __FILE__;
Expand Down
4 changes: 4 additions & 0 deletions tools/perf/util/trace-event-perl.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@ typedef int INTERP;
#define dXSUB_SYS
#define pTHX_
static inline void newXS(const char *a, void *b, const char *c) {}
static void boot_Perf__Trace__Context(pTHX_ CV *cv) {}
static void boot_DynaLoader(pTHX_ CV *cv) {}
#else
#include <EXTERN.h>
#include <perl.h>
void boot_Perf__Trace__Context(pTHX_ CV *cv);
void boot_DynaLoader(pTHX_ CV *cv);
typedef PerlInterpreter * INTERP;
#endif

Expand Down

0 comments on commit 3a9a0be

Please sign in to comment.