linux-mips
[Top] [All Lists]

[PATCH][MIPS] fix kgdb build error

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH][MIPS] fix kgdb build error
From: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Date: Sat, 25 Oct 2008 17:30:35 +0900
Cc: yoichi_yuasa@tripeaks.co.jp, linux-mips <linux-mips@linux-mips.org>, David Daney <ddaney@caviumnetworks.com>
In-reply-to: <20081024164241.GB21892@linux-mips.org>
Organization: TriPeaks Corporation
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20081025001725.7ac18a1b.yoichi_yuasa@tripeaks.co.jp> <20081024164241.GB21892@linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org
On Fri, 24 Oct 2008 17:42:41 +0100
Ralf Baechle <ralf@linux-mips.org> wrote:

> 
> <asm/ptrace.h> is exported to userland so we can't include these types.
> Basically <linux/types.h> or <stdint.h> are polluting the namespace.  So
> either we use some __* type and include only those or we get entirely
> rid of typedef'ed types - as in the patch that you've posted while I was
> writing this.

Thank you for your comment.
KGDB still has a problem. This is kernel part in ptrace.h.

---

Fix KGDB build error

In file included from include/linux/ptrace.h:49,
                 from arch/mips/kernel/kgdb.c:25:
/home/yuasa/src/linux/test/mips/linux/arch/mips/include/asm/ptrace.h:123: 
error: expected declaration specifiers or '...' before '__s64'
/home/yuasa/src/linux/test/mips/linux/arch/mips/include/asm/ptrace.h:124: 
error: expected declaration specifiers or '...' before '__s64'
/home/yuasa/src/linux/test/mips/linux/arch/mips/include/asm/ptrace.h:126: 
error: expected declaration specifiers or '...' before '__u32'
/home/yuasa/src/linux/test/mips/linux/arch/mips/include/asm/ptrace.h:127: 
error: expected declaration specifiers or '...' before '__u32'
make[1]: *** [arch/mips/kernel/kgdb.o] Error 1

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

diff -pruN -X /home/yuasa/Memo/dontdiff 
linux-orig/arch/mips/include/asm/ptrace.h linux/arch/mips/include/asm/ptrace.h
--- linux-orig/arch/mips/include/asm/ptrace.h   2008-10-25 14:12:22.034139781 
+0900
+++ linux/arch/mips/include/asm/ptrace.h        2008-10-25 16:39:36.031229216 
+0900
@@ -116,6 +116,7 @@ struct pt_watch_regs {
 
 #include <linux/compiler.h>
 #include <linux/linkage.h>
+#include <linux/types.h>
 #include <asm/isadep.h>
 
 struct task_struct;

<Prev in Thread] Current Thread [Next in Thread>