public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [x86 patch] Fix UML init/do_mounts.h build failure
@ 2007-10-25 10:53 Balbir Singh
  0 siblings, 0 replies; 3+ messages in thread
From: Balbir Singh @ 2007-10-25 10:53 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Balbir Singh, Linux Kernel Mailing List



Fix stat.h to not use __i386__, but use BITS_PER_LONG. The UML architecture
in turn includes this file. This helps resolve one build failure in the
current UML code

Before the fix, the failure was

In file included from init/do_mounts.c:19:
init/do_mounts.h: In function 'bstat':
init/do_mounts.h:25: error: storage size of 'stat' isn't known
init/do_mounts.h:25: warning: unused variable 'stat'
init/do_mounts.h:33: warning: control reaches end of non-void function
make[1]: *** [init/do_mounts.o] Error 1
make: *** [init/do_mounts.o] Error 2


Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
---

 include/asm-x86/stat.h |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff -puN init/do_mounts.h~uml-fix-init-domounts init/do_mounts.h
diff -puN include/asm-x86/stat.h~uml-fix-init-domounts include/asm-x86/stat.h
--- 2.6.24-rc1/include/asm-x86/stat.h~uml-fix-init-domounts	2007-10-25 16:23:04.000000000 +0530
+++ 2.6.24-rc1-balbir/include/asm-x86/stat.h	2007-10-25 16:23:04.000000000 +0530
@@ -1,9 +1,11 @@
 #ifndef _ASM_X86_STAT_H
 #define _ASM_X86_STAT_H
 
+#include <asm/types.h>
+
 #define STAT_HAVE_NSEC 1
 
-#ifdef __i386__
+#if BITS_PER_LONG == 32
 struct stat {
 	unsigned long  st_dev;
 	unsigned long  st_ino;
@@ -63,7 +65,7 @@ struct stat64 {
 	unsigned long long	st_ino;
 };
 
-#else /* __i386__ */
+#else /* BITS_PER_LONG == 32 */
 
 struct stat {
 	unsigned long	st_dev;
_

-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [x86 patch] Fix UML init/do_mounts.h build failure
@ 2007-10-25 11:36 Balbir Singh
  2007-10-27  3:21 ` Al Viro
  0 siblings, 1 reply; 3+ messages in thread
From: Balbir Singh @ 2007-10-25 11:36 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar; +Cc: Balbir Singh, Linux Kernel Mailing List



Fix stat.h to not use __i386__, but use BITS_PER_LONG. The UML architecture
in turn includes this file. This helps resolve one build failure in the
current UML code

Before the fix, the failure was

In file included from init/do_mounts.c:19:
init/do_mounts.h: In function 'bstat':
init/do_mounts.h:25: error: storage size of 'stat' isn't known
init/do_mounts.h:25: warning: unused variable 'stat'
init/do_mounts.h:33: warning: control reaches end of non-void function
make[1]: *** [init/do_mounts.o] Error 1
make: *** [init/do_mounts.o] Error 2


Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
---

 include/asm-x86/stat.h |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff -puN init/do_mounts.h~uml-fix-init-domounts init/do_mounts.h
diff -puN include/asm-x86/stat.h~uml-fix-init-domounts include/asm-x86/stat.h
--- 2.6.24-rc1/include/asm-x86/stat.h~uml-fix-init-domounts	2007-10-25 16:23:04.000000000 +0530
+++ 2.6.24-rc1-balbir/include/asm-x86/stat.h	2007-10-25 16:23:04.000000000 +0530
@@ -1,9 +1,11 @@
 #ifndef _ASM_X86_STAT_H
 #define _ASM_X86_STAT_H
 
+#include <asm/types.h>
+
 #define STAT_HAVE_NSEC 1
 
-#ifdef __i386__
+#if BITS_PER_LONG == 32
 struct stat {
 	unsigned long  st_dev;
 	unsigned long  st_ino;
@@ -63,7 +65,7 @@ struct stat64 {
 	unsigned long long	st_ino;
 };
 
-#else /* __i386__ */
+#else /* BITS_PER_LONG == 32 */
 
 struct stat {
 	unsigned long	st_dev;
_

-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [x86 patch] Fix UML init/do_mounts.h build failure
  2007-10-25 11:36 [x86 patch] Fix UML init/do_mounts.h build failure Balbir Singh
@ 2007-10-27  3:21 ` Al Viro
  0 siblings, 0 replies; 3+ messages in thread
From: Al Viro @ 2007-10-27  3:21 UTC (permalink / raw)
  To: Balbir Singh; +Cc: Thomas Gleixner, Ingo Molnar, Linux Kernel Mailing List

On Thu, Oct 25, 2007 at 05:06:30PM +0530, Balbir Singh wrote:
> 
> 
> Fix stat.h to not use __i386__, but use BITS_PER_LONG. The UML architecture
> in turn includes this file. This helps resolve one build failure in the
> current UML code

NACK

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-27  3:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-25 11:36 [x86 patch] Fix UML init/do_mounts.h build failure Balbir Singh
2007-10-27  3:21 ` Al Viro
  -- strict thread matches above, loose matches on Subject: below --
2007-10-25 10:53 Balbir Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox