Patchwork sparc: sigutil: Include <linux/errno.h>

login
register
mail settings
Submitter Ben Hutchings
Date Nov. 13, 2011, 7:20 a.m.
Message ID <1321168804.18929.277.camel@deadeye>
Download mbox | patch
Permalink /patch/125380/
State Accepted
Delegated to: David Miller
Headers show

Comments

Ben Hutchings - Nov. 13, 2011, 7:20 a.m.
This file introduced in 2.6.32.47 currently fails to compile:

arch/sparc/kernel/sigutil_64.c: In function 'save_fpu_state':
arch/sparc/kernel/sigutil_64.c:25: error: 'EFAULT' undeclared (first use in this function)

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
I assume this works in 3.1 due to indirect inclusion of <linux/errno.h>,
but it doesn't in 2.6.32.  It might be worth applying this in mainline
anyway, to avoid that assumption.

Ben.

 arch/sparc/kernel/sigutil_64.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
David Miller - Nov. 14, 2011, 5:03 a.m.
From: Ben Hutchings <ben@decadent.org.uk>
Date: Sun, 13 Nov 2011 07:20:04 +0000

> This file introduced in 2.6.32.47 currently fails to compile:
> 
> arch/sparc/kernel/sigutil_64.c: In function 'save_fpu_state':
> arch/sparc/kernel/sigutil_64.c:25: error: 'EFAULT' undeclared (first use in this function)
> 
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
> I assume this works in 3.1 due to indirect inclusion of <linux/errno.h>,
> but it doesn't in 2.6.32.  It might be worth applying this in mainline
> anyway, to avoid that assumption.

Applied, thanks Ben.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Greg KH - Nov. 16, 2011, 4:41 p.m.
On Mon, Nov 14, 2011 at 12:03:39AM -0500, David Miller wrote:
> From: Ben Hutchings <ben@decadent.org.uk>
> Date: Sun, 13 Nov 2011 07:20:04 +0000
> 
> > This file introduced in 2.6.32.47 currently fails to compile:
> > 
> > arch/sparc/kernel/sigutil_64.c: In function 'save_fpu_state':
> > arch/sparc/kernel/sigutil_64.c:25: error: 'EFAULT' undeclared (first use in this function)
> > 
> > Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> > ---
> > I assume this works in 3.1 due to indirect inclusion of <linux/errno.h>,
> > but it doesn't in 2.6.32.  It might be worth applying this in mainline
> > anyway, to avoid that assumption.
> 
> Applied, thanks Ben.

David, should I queue this up in the .32-stable tree now to fix the
build problem that we have at the moment?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Nov. 16, 2011, 6:27 p.m.
From: Greg KH <greg@kroah.com>
Date: Wed, 16 Nov 2011 08:41:25 -0800

> On Mon, Nov 14, 2011 at 12:03:39AM -0500, David Miller wrote:
>> From: Ben Hutchings <ben@decadent.org.uk>
>> Date: Sun, 13 Nov 2011 07:20:04 +0000
>> 
>> > This file introduced in 2.6.32.47 currently fails to compile:
>> > 
>> > arch/sparc/kernel/sigutil_64.c: In function 'save_fpu_state':
>> > arch/sparc/kernel/sigutil_64.c:25: error: 'EFAULT' undeclared (first use in this function)
>> > 
>> > Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
>> > ---
>> > I assume this works in 3.1 due to indirect inclusion of <linux/errno.h>,
>> > but it doesn't in 2.6.32.  It might be worth applying this in mainline
>> > anyway, to avoid that assumption.
>> 
>> Applied, thanks Ben.
> 
> David, should I queue this up in the .32-stable tree now to fix the
> build problem that we have at the moment?

Yes, please do.  Thanks Greg.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/sparc/kernel/sigutil_64.c b/arch/sparc/kernel/sigutil_64.c
index 6edc4e5..06a69b4 100644
--- a/arch/sparc/kernel/sigutil_64.c
+++ b/arch/sparc/kernel/sigutil_64.c
@@ -2,6 +2,7 @@ 
 #include <linux/types.h>
 #include <linux/thread_info.h>
 #include <linux/uaccess.h>
+#include <linux/errno.h>
 
 #include <asm/sigcontext.h>
 #include <asm/fpumacro.h>