- 论坛徽章:
- 0
|
原帖由 springwind426 于 2008-3-8 15:50 发表
试试把 proc_net 都换成 init_net.proc_net 试试
我是参考xt_hashlimit来修改的,我看2.6.24里面的xt_hashlimit.c里面是用的 init_net.proc_net
而2.6.23的xt_hashlimit.c里面用的是 proc_net
结果倒是编译出来了,不过不少警告。。。
make
make -C /lib/modules/2.6.24.3skylove/build M=/data/hashspeed-0.1 modules
make[1]: Entering directory `/data/linux-2.6.24.3'
make[1]: Warning: File `.vmlinux.o.cmd' has modification time 2.4e+04 s in the future
make[2]: Warning: File `include/config/auto.conf' has modification time 2.4e+04 s in the future
CC [M] /data/hashspeed-0.1/ipt_hashspeed.o
make[2]: 警告:检测到时钟错误。您的创建可能是不完整的。
Building modules, stage 2.
make[2]: Warning: File `include/config/auto.conf' has modification time 2.4e+04 s in the future
MODPOST 1 modules
CC /data/hashspeed-0.1/ipt_hashspeed.mod.o
LD [M] /data/hashspeed-0.1/ipt_hashspeed.ko
make[2]: 警告:检测到时钟错误。您的创建可能是不完整的。
make[1]: 警告:检测到时钟错误。您的创建可能是不完整的。
make[1]: Leaving directory `/data/linux-2.6.24.3'
cc -O2 -Wall -DIPTABLES_VERSION=\"1.4.0\" -I/usr/src/iptables/include -I/lib/modules/2.6.24.3skylove/build/include -fPIC -c libipt_hashspeed.c
libipt_hashspeed.c: 在函数 ‘parse’ 中:
libipt_hashspeed.c:198: 警告:传递参数 4 (属于 ‘string_to_number_ll’)时在不兼容的指针类型间转换
libipt_hashspeed.c: 在函数 ‘print’ 中:
libipt_hashspeed.c:321: 警告:格式 ‘%Lu’ 需要类型 ‘long long unsigned int’,但实参 2 的类型为 ‘u_int64_t’
libipt_hashspeed.c: 在函数 ‘save’ 中:
libipt_hashspeed.c:360: 警告:格式 ‘%Lu’ 需要类型 ‘long long unsigned int’,但实参 2 的类型为 ‘u_int64_t’
cc -shared -o libipt_hashspeed.so libipt_hashspeed.o |
|