This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] struct linux_binprm Not Declared for ARM


Hi,

in my attempt to get inode-uprobes based user space to work with an
3.4/3.5 kernel, I couln't compile my script due to the following compile
error

cc1: warnings being treated as errors
In file included from /usr/local/systemtap/share/systemtap/runtime/stp_utrace.c:20:0,
                 from /usr/local/systemtap/share/systemtap/runtime/linux/task_finder2.c:4,
                 from /usr/local/systemtap/share/systemtap/runtime/linux/task_finder.c:17,
                 from /usr/local/systemtap/share/systemtap/runtime/linux/runtime.h:166,
                 from /usr/local/systemtap/share/systemtap/runtime/runtime.h:17,
                 from /home/polle/work/issues/2012-07-24-systemtap-3.4/tmp/log_src.c:21:
/usr/local/systemtap/share/systemtap/runtime/stp_utrace.h:259:14: error: âstruct linux_binprmâ declared inside parameter list
/usr/local/systemtap/share/systemtap/runtime/stp_utrace.h:259:14: error: its scope is only this definition or declaration, which is probably not what you want

The attached patch inserts the needed include directive.

Kind Regards,
Torsten

>From e1fbb1aa8c7ea64ea03b30bf4c42117fc9d4741f Mon Sep 17 00:00:00 2001
Message-Id: <e1fbb1aa8c7ea64ea03b30bf4c42117fc9d4741f.1343328283.git.Torsten.Polle@gmx.de>
From: Torsten Polle <Torsten.Polle@gmx.de>
Date: Thu, 26 Jul 2012 20:40:12 +0200
Subject: [PATCH] Added include path to be able to compile for ARM.

Compiling a script against a 3.4 ARM kerne with uprobes support results in a
compile error because struct linux_binprm is not defined. Including
linux/binfmts.h fixes the issue.

Signed-off-by: Torsten Polle <Torsten.Polle@gmx.de>
---
 runtime/stp_utrace.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/runtime/stp_utrace.h b/runtime/stp_utrace.h
index 2e11ceb..399af5b 100644
--- a/runtime/stp_utrace.h
+++ b/runtime/stp_utrace.h
@@ -4,6 +4,7 @@
 #include <linux/list.h>
 #include <linux/kref.h>
 #include <linux/sched.h>
+#include <linux/binfmts.h>
 
 /*
  * Event bits passed to utrace_set_events().
-- 
1.7.4.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]