2002-06-09 14:55:09

by Thomas 'Dent' Mirlacher

[permalink] [raw]
Subject: [PATCH][2.5.21] compilation fix

seems the include file cleanup was a little bit over-optimized :)

this simple patch should fix the problem:

diff -Nru a/include/linux/bio.h b/include/linux/bio.h
--- a/include/linux/bio.h Sun Jun 9 21:54:07 2002
+++ b/include/linux/bio.h Sun Jun 9 21:54:07 2002
@@ -23,6 +23,7 @@
#include <linux/kdev_t.h>
/* Platforms may set this to teach the BIO layer about IOMMU hardware. */
#include <asm/io.h>
+#include <asm/atomic.h>
#ifndef BIO_VMERGE_BOUNDARY
#define BIO_VMERGE_BOUNDARY 0
#endif
diff -Nru a/kernel/fork.c b/kernel/fork.c
--- a/kernel/fork.c Sun Jun 9 21:54:07 2002
+++ b/kernel/fork.c Sun Jun 9 21:54:07 2002
@@ -19,6 +19,7 @@
#include <linux/module.h>
#include <linux/vmalloc.h>
#include <linux/completion.h>
+#include <linux/sched.h>
#include <linux/namespace.h>
#include <linux/personality.h>
#include <linux/file.h>


tm
--
in some way i do, and in some way i don't.


2002-06-09 15:07:34

by Russell King

[permalink] [raw]
Subject: Re: [PATCH][2.5.21] compilation fix

On Sun, Jun 09, 2002 at 04:55:08PM +0200, Thomas 'Dent' Mirlacher wrote:
> seems the include file cleanup was a little bit over-optimized :)

The patch I'm using is as follows. Since namespace.h needs the contents
of dcache, task struct and semaphores, it seems sensible to include
these two files into namespace.h.

For the future: If the task_struct in sched.h is split into its own
include file, namespace.h could include this file, but namespace.h
will also need asm/semaphore.h

--- orig/kernel/fork.c Sun Jun 9 16:02:04 2002
+++ linux/kernel/fork.c Sun Jun 9 15:19:30 2002
@@ -24,6 +24,7 @@
#include <linux/file.h>
#include <linux/binfmts.h>
#include <linux/fs.h>
+#include <linux/mm.h>

#include <asm/pgtable.h>
#include <asm/pgalloc.h>
--- orig/mm/vmalloc.c Sun Jun 9 16:02:04 2002
+++ linux/mm/vmalloc.c Sun Jun 9 15:26:25 2002
@@ -10,6 +10,7 @@
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/spinlock.h>
+#include <linux/mm.h>
#include <linux/highmem.h>
#include <linux/smp_lock.h>

--- orig/include/linux/namespace.h Tue Feb 19 00:47:25 2002
+++ linux/include/linux/namespace.h Sun Jun 9 16:04:05 2002
@@ -2,6 +2,9 @@
#define _NAMESPACE_H_
#ifdef __KERNEL__

+#include <linux/dcache.h>
+#include <linux/sched.h>
+
struct namespace {
atomic_t count;
struct vfsmount * root;


--
Russell King ([email protected]) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html