FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

LinkBack Thread Tools
Old 05-21-2010, 01:33 PM
Andy Whitcroft
Default UBUNTU: SAUCE: powerpc: fix compile error when ptrace.h is included from userspace

The commit below introduced some new userspace structures to ptrace.h
this necessarily required the inclusion of linux/types.h for the kernel
and stdlib.h for userspace:

commit 3162d92dfb79a0b5fc03380b8819fa5f870ebf1e
Author: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Date: Mon Feb 8 11:51:05 2010 +0000

powerpc: Extended ptrace interface

However although linux/types.h is assembly safe, stdlib.h is not. So that
when the unifdef processed versions are included in assembly files such
as occurs in eglibc, non-assembly type definitions are exposed leading
to build errors.

Looking at the original commit all of the added structures are correctly
protected by __ASSEMBLY__ wrappers, therefor the headers are actually only
required in that context. Move the headers inside the first __ASSEMBLY__

BugLink: http://bugs.launchpad.net/bugs/583733
Signed-off-by: Andy Whitcroft <apw@canonical.com>
arch/powerpc/include/asm/ptrace.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h
index 9e2d84c..0ed710e 100644
--- a/arch/powerpc/include/asm/ptrace.h
+++ b/arch/powerpc/include/asm/ptrace.h
@@ -24,14 +24,14 @@
* 2 of the License, or (at your option) any later version.

+#ifndef __ASSEMBLY__
#ifdef __KERNEL__
#include <linux/types.h>
#include <stdint.h>

-#ifndef __ASSEMBLY__
struct pt_regs {
unsigned long gpr[32];
unsigned long nip;

kernel-team mailing list

Thread Tools

All times are GMT. The time now is 06:58 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org