On Sun, 2011-09-11 at 18:37 +0400, vb wrote: [...] > Ehm...Thnks for the asnwer but I am stuck anyway:( How should i compile > self-made module in that way if such Makefile fails?: > --------------------------- > obj-m := tm.o > > KDIR := /lib/modules/$(shell uname -r)/build > PWD := $(shell pwd) > > default: > $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) module > ---------------------------- > fails because it searchs for *.h in `uname -r` dir which points to > include-empty dir tree: > > ---------------------------- > make[1]: Entering directory `/usr/src/linux-headers-3.0.0-1-686-pae' > CC [M] /home/cc/code/c/module/tm.o > /home/cc/code/c/module/tm.c: In function 'init_module': > /home/cc/code/c/module/tm.c:21:12: warning: assignment from incompatible > pointer type > /home/cc/code/c/module/tm.c:22:17: error: 'NF_IP_PRE_ROUTING' undeclared > (first use in this function) > ---------------------------- [...]
If your claim was correct, then there would be an error message about being unable to find the header. These error messages indicate that either you are not including all the headers you need to, or the API has changed. Ben. -- Ben Hutchings Beware of programmers who carry screwdrivers. - Leonard Brandwein
signature.asc
Description: This is a digitally signed message part