View previous topic :: View next topic |
Author |
Message |
nicky
Joined: 05 Dec 2013 Posts: 8 Location: china
|
Posted: Thu Dec 05, 2013 6:13 am Post subject: cross compile warning |
|
|
Dear,
I try to port miniupnpd-1.8 to my project, and meet some problems.
I find it is too difficult to do the porting.
Here is my make:
IPTABLESPATH=/home/yongfei/iad-linux/iptables-1.4.1 make -f Makefile.linux CC=/opt/OpenWrt/staging_dir/toolchain-arm_gcc-4.3.4_uClibc-0.9.30.1/usr/bin/arm-openwrt-linux-gcc STRIP=/opt/OpenWrt/staging_dir/toolchain-arm_gcc-4.3.4_uClibc-0.9.30.1/usr/bin/arm-openwrt-linux-strip PREFIX=/home/yongfei/iad-linux/miniupnpd-1.8/../install CFLAGS="-I/usr/local/include -I/home/yongfei/iad-linux/iptables-1.4.1/include -DIPTABLES_143"
The iptables i use is the version 1.4.1, if i don not define IPTABLES_143, it can not compile pass. Now i defined, and there are warnings, please guide me.
netfilter/iptcrdr.c: In function 'get_redirect_rule':
netfilter/iptcrdr.c:264: warning: passing argument 2 of 'iptc_first_rule' from incompatible pointer type
netfilter/iptcrdr.c:266: warning: passing argument 2 of 'iptc_next_rule' from incompatible pointer type
netfilter/iptcrdr.c:311: warning: passing argument 1 of 'iptc_free' from incompatible pointer type
netfilter/iptcrdr.c: In function 'get_redirect_rule_by_index':
netfilter/iptcrdr.c:362: warning: passing argument 2 of 'iptc_first_rule' from incompatible pointer type
netfilter/iptcrdr.c:364: warning: passing argument 2 of 'iptc_next_rule' from incompatible pointer type
netfilter/iptcrdr.c:412: warning: passing argument 1 of 'iptc_free' from incompatible pointer type
netfilter/iptcrdr.c: In function 'delete_rule_and_commit':
netfilter/iptcrdr.c:429: warning: passing argument 3 of 'iptc_delete_num_entry' from incompatible pointer type
netfilter/iptcrdr.c:439: warning: passing argument 1 of 'iptc_commit' from incompatible pointer type
netfilter/iptcrdr.c:450: warning: passing argument 1 of 'iptc_free' from incompatible pointer type
netfilter/iptcrdr.c: In function 'delete_redirect_and_filter_rules':
netfilter/iptcrdr.c:489: warning: passing argument 2 of 'iptc_first_rule' from incompatible pointer type
netfilter/iptcrdr.c:491: warning: passing argument 2 of 'iptc_next_rule' from incompatible pointer type
netfilter/iptcrdr.c:529: warning: passing argument 1 of 'iptc_free' from incompatible pointer type
netfilter/iptcrdr.c:548: warning: passing argument 2 of 'iptc_first_rule' from incompatible pointer type
netfilter/iptcrdr.c:550: warning: passing argument 2 of 'iptc_next_rule' from incompatible pointer type
netfilter/iptcrdr.c: In function 'iptc_init_verify_and_append':
netfilter/iptcrdr.c:677: warning: passing argument 1 of 'iptc_free' from incompatible pointer type
netfilter/iptcrdr.c:685: warning: passing argument 3 of 'iptc_append_entry' from incompatible pointer type
netfilter/iptcrdr.c:694: warning: passing argument 1 of 'iptc_free' from incompatible pointer type
netfilter/iptcrdr.c:701: warning: passing argument 1 of 'iptc_commit' from incompatible pointer type
netfilter/iptcrdr.c:710: warning: passing argument 1 of 'iptc_free' from incompatible pointer type
netfilter/iptcrdr.c:718: warning: passing argument 1 of 'iptc_free' from incompatible pointer type
netfilter/iptcrdr.c: In function 'get_portmappings_in_range':
netfilter/iptcrdr.c:878: warning: passing argument 2 of 'iptc_first_rule' from incompatible pointer type
netfilter/iptcrdr.c:880: warning: passing argument 2 of 'iptc_next_rule' from incompatible pointer type
netfilter/iptcrdr.c:924: warning: passing argument 1 of 'iptc_free' from incompatible pointer type
I just very doubt, the iptables version i used is 1.4.1, and but why i shoud define IPTABLES_143.
I found something, in file netfilter/iptcrdr.c,
#define ip_nat_multi_range nf_nat_multi_range
#define ip_nat_range nf_nat_range
these two are under define IPTABLES_143, but why not add define in codes, such as when use ip_nat_multi_range, it should be as folow:
#ifdef IPTABLES_143
const struct ip_nat_multi_range * mr;
#endif
Correct? |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1593
|
Posted: Fri Dec 06, 2013 4:25 pm Post subject: |
|
|
you may have .h files in /usr/local/include which colide with the iptables headers.
what are the errors if you don't define IPTABLES_143 ? (which you should not if you are using iptables 1.4.1) _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
nicky
Joined: 05 Dec 2013 Posts: 8 Location: china
|
Posted: Mon Dec 09, 2013 10:26 am Post subject: |
|
|
Thanks.
I can not remember the errors. Maybe "ip_nat_multi_range" undeclared or "iptc_handle_t" undeclared.
And finally, I used iptables-1.4.1 and miniupnpd-1.2 versions, and it compiled pass. |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1593
|
Posted: Mon Dec 09, 2013 10:05 pm Post subject: |
|
|
nicky wrote: | Thanks.
I can not remember the errors. Maybe "ip_nat_multi_range" undeclared or "iptc_handle_t" undeclared.
And finally, I used iptables-1.4.1 and miniupnpd-1.2 versions, and it compiled pass. |
you should not use miniupnpd-1.2, a lot of bugs were fixed since ! _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
nicky
Joined: 05 Dec 2013 Posts: 8 Location: china
|
Posted: Tue Dec 10, 2013 7:33 am Post subject: |
|
|
Oh, then i will report the errors to you. |
|
Back to top |
|
|
|