miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

cross compile warning

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Compilation/Installation
View previous topic :: View next topic  
Author Message
nicky



Joined: 05 Dec 2013
Posts: 8
Location: china

PostPosted: Thu Dec 05, 2013 6:13 am    Post subject: cross compile warning Reply with quote

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
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1394

PostPosted: Fri Dec 06, 2013 4:25 pm    Post subject: Reply with quote

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.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
nicky



Joined: 05 Dec 2013
Posts: 8
Location: china

PostPosted: Mon Dec 09, 2013 10:26 am    Post subject: Reply with quote

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
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1394

PostPosted: Mon Dec 09, 2013 10:05 pm    Post subject: Reply with quote

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.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
nicky



Joined: 05 Dec 2013
Posts: 8
Location: china

PostPosted: Tue Dec 10, 2013 7:33 am    Post subject: Reply with quote

Oh, then i will report the errors to you.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Compilation/Installation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.