PROBLEM: compiling hfs module in 2.5.21

brendanburns@attbi.com
Tue, 11 Jun 2002 01:05:32 +0000


--NextPart_Webmail_9m3u9jl4l_23256_1023757532
Content-Type: text/plain
Content-Transfer-Encoding: 8bit

Hello,
I ran into a problem compiling the hfs (hierarchical file
system) as a module in kernel 2.5.21. I'm running gcc
version 2.95.4 20011002 (Debian prerelease) on a x86.
The error message from gcc is:
gcc -Wp,-MD,.inode.o.d -D__KERNEL__
-I/usr/src/linux-2.5.21/include -Wall -Wstrict-prototypes
-Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -pipe
-mpreferred-stack-boundary=2 -march=i686 -nostdinc
-iwithprefix include -DMODULE -include
/usr/src/linux-2.5.21/include/linux/modversions.h
-DKBUILD_BASENAME=inode -c -o inode.o inode.c
inode.c: In function `hfs_prepare_write':
inode.c:242: dereferencing pointer to incomplete type
make[3]: *** [inode.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.5.21/fs/hfs'
make[2]: *** [_subdir_hfs] Error 2
make[2]: Leaving directory `/usr/src/linux-2.5.21/fs'
make[1]: *** [fs] Error 2
make[1]: Leaving directory `/usr/src/linux-2.5.21'
make: *** [modules] Error 2

My solution is to add #include <linux/mm.h> to
fs/hfs/inode.c, a patch to do this is attached.

Thanks!
--brendan

--NextPart_Webmail_9m3u9jl4l_23256_1023757532
Content-Type: application/octet-stream; name="inode-header.patch"
Content-Transfer-Encoding: 7bit

--- a/fs/hfs/inode.c Thu Jun 6 18:15:07 2002
+++ b/fs/hfs/inode.c Thu Jun 6 18:13:13 2002
@@ -17,6 +17,7 @@
*/

#include "hfs.h"
+#include <linux/mm.h>
#include <linux/hfs_fs_sb.h>
#include <linux/hfs_fs_i.h>
#include <linux/hfs_fs.h>

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