Linux module compilation prob

Linux module compilation prob

Post by gokul_svuc » Fri, 09 Jan 2004 15:27:21

Hi all,
I am writing a simple kernel module dd for a
memory device for a i386 redhat 8.0 .However i am
getting a lot of errors when i compile it.

Here are the compilation flags i have used

KERNELDIR = /usr/src/linux-2.4

$(KERNELDIR)/include -O
Here are the errors i get:

In file included from memdrv.c:47:
/usr/src/linux-2.4/include/asm/uaccess.h:35: invalid
suffix on integer constant
/usr/src/linux-2.4/include/asm/uaccess.h:35: parse
error before numeric constant
`__verify_write_R_ver_str' declared as function
returning a function

I get a lot of errors like this

Other than the errors in uacces.h(its the only header
giving errors),i get the following errors in my code
wherever i have used kernel specific functions like
kmalloc ,kfree,printk etc.

memdrv.c:75: invalid suffix on integer constant
memdrv.c:75: called object is not a function

I am using gcc version 3.2.Also i am running kernel
2.6.0 while i am trying to compile for 2.4.18(i have
the sources for both)

Thanks in Advance,
P.Gokul Krishna.