Re: shm.c compile failure

From: Niels Kristian Bech Jensen (nkbj@image.dk)
Date: Sun Mar 19 2000 - 16:45:17 EST


On Sun, 19 Mar 2000, Mitch Adair wrote:

> 2.3.99-pre2 gives this when I compiled:
>
> <<<<<>>>>>
> shm.c:142: `THIS_MODULE' undeclared here (not in a function)
> shm.c:142: initializer element for `shm_fs_type.owner' is not constant
> make[2]: *** [shm.o] Error 1
> make[1]: *** [first_rule] Error 2
> make: *** [_dir_ipc] Error 2
> Command exited with non-zero status 2
> <<<<<>>>>>
>
> This makes it compile:
>
> --- shm.c~ Sun Mar 19 14:19:12 2000
> +++ shm.c Sun Mar 19 14:38:40 2000
> @@ -42,6 +42,7 @@
> #include <linux/pagemap.h>
> #include <linux/proc_fs.h>
> #include <linux/highmem.h>
> +#include <linux/module.h>
>
> #include <asm/uaccess.h>
> #include <asm/pgtable.h>
>
Here is another fix for the same problem. I can't tell which one is the
most correct:

diff -u --recursive --new-file v2.3.99-pre2/linux/include/linux/fs.h linux/include/linux/fs.h
--- v2.3.99-pre2/linux/include/linux/fs.h Sun Mar 19 20:47:55 2000
+++ linux/include/linux/fs.h Sun Mar 19 22:27:57 2000
@@ -7,6 +7,7 @@
  */
 
 #include <linux/config.h>
+#include <linux/module.h>
 #include <linux/linkage.h>
 #include <linux/limits.h>
 #include <linux/wait.h>

-- 
Niels Kristian Bech Jensen -- nkbj@image.dk -- http://www.image.dk/~nkbj/

----------->> Stop software piracy --- use free software! <<-----------

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:27 EST