The SIAL interpreter is confused by typedef'ing task_t in kernel versions that
already have that typedef in the kernel. The typedef was removed with kernel
2.6.18, so adding the typedef only when LINUX_RELEASE is greater than 2.6.17
fixes the problem.
Signed-off-by: Bernhard Walle <bwalle(a)suse.de>
---
files.c | 2 ++
ps.c | 3 +++
2 files changed, 5 insertions(+)
--- a/files.c
+++ b/files.c
@@ -129,7 +129,9 @@ sfiles_help()
" DENTRY INODE SUPERBLK TYPE PATH\n"+
" f745fd60 f7284640 f73a3e00 REG /var/spool/lpd/lpd.lock\n";
}
+#if LINUX_RELEASE > 0x020611
typedef struct task_struct task_t;
+#endif
void print_task_header(unsigned long tval, int newline)
{
--- a/ps.c
+++ b/ps.c
@@ -62,7 +62,10 @@ main()
return 1;
}
+#if LINUX_RELEASE > 0x020611
typedef struct task_struct task_t;
+#endif
+
struct mm_struct *x;
void
walk_tasks(string callback)