threadhead
05-04-2004, 03:40 PM
hello,
i have been trying to get some basic code working.
its some piece of userspace code that does have problems
with including the correct files when doing the preprocessing.
for example i have:
#include <linux/module.h>
on preprocessing, the standard directory is asked for that file, that is /usr/include/* for my machine.
the problem is that the files in that directory are very old, as they are left from the install when kernel 2.4.18 was
current.
i am using a 2.6 kernel now.
further on i am trying to access elements in structs for example
that only exist since 2.6 kernel series.
but as the preprocessor asks /usr/include/*, i am getting:
file.c: In function `main':
file.c:100: error: structure has no member named `core_size'
in this file.c i am trying to access an element of the struct module of the 2.6 kernels.
but as the preprocessor is referring to the old includes,
that element obviously doesnt exist.
now:
how can i update my header include files to prevent
version confusion?
or how is it possible to redirect every #include to the
current kernel source tree includes?
i tried gcc -I and -L options with the current kernel source tree includes with no success and even more errors.
thanks for your time!
threadhead
i have been trying to get some basic code working.
its some piece of userspace code that does have problems
with including the correct files when doing the preprocessing.
for example i have:
#include <linux/module.h>
on preprocessing, the standard directory is asked for that file, that is /usr/include/* for my machine.
the problem is that the files in that directory are very old, as they are left from the install when kernel 2.4.18 was
current.
i am using a 2.6 kernel now.
further on i am trying to access elements in structs for example
that only exist since 2.6 kernel series.
but as the preprocessor asks /usr/include/*, i am getting:
file.c: In function `main':
file.c:100: error: structure has no member named `core_size'
in this file.c i am trying to access an element of the struct module of the 2.6 kernels.
but as the preprocessor is referring to the old includes,
that element obviously doesnt exist.
now:
how can i update my header include files to prevent
version confusion?
or how is it possible to redirect every #include to the
current kernel source tree includes?
i tried gcc -I and -L options with the current kernel source tree includes with no success and even more errors.
thanks for your time!
threadhead