Skip to contentSkip to conversation

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

PATCH Applied Ben Hutchings 3 participants 4 messages Nov 13, 2011 – Nov 16, 2011 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sparc: sigutil: Include <linux/errno.h>

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)

---
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(-)
arch/sparc/kernel/sigutil_64.c +1 -0
index 6edc4e5..06a69b4 100644
@@ -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>
Signature · 1 line
1.7.7
maintainer Applied
#1 lore raw

From: Ben Hutchings <[email protected]>
Date: Sun, 13 Nov 2011 07:20:04 +0000

Quoted 10 lines

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)

---
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.

#2 lore raw
In reply to Ben Hutchings
Quoted 8 lines · David Miller

From: Ben Hutchings <[email protected]>
Date: Sun, 13 Nov 2011 07:20:04 +0000

Quoted 5 lines

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)

Quoted 7 lines
Quoted 5 lines

---
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

maintainer
#3 lore raw
In reply to Ben Hutchings

From: Greg KH <[email protected]>
Date: Wed, 16 Nov 2011 08:41:25 -0800

Quoted 15 lines · David Miller
Quoted 14 lines

From: Ben Hutchings <[email protected]>
Date: Sun, 13 Nov 2011 07:20:04 +0000

Quoted 10 lines

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)

---
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.

Quoted 4 lines
Quoted 1 line

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.