[Bug 16931] New: Compile broken in dlls/iphplpapi/ipstats.c on NetBSD
http://bugs.winehq.org/show_bug.cgi?id=16931 Summary: Compile broken in dlls/iphplpapi/ipstats.c on NetBSD Product: Wine Version: 1.1.12 Platform: PC OS/Version: NetBSD Status: NEW Keywords: patch, source Severity: blocker Priority: P2 Component: build-env AssignedTo: wine-bugs(a)winehq.org ReportedBy: austinenglish(a)gmail.com Created an attachment (id=18694) --> (http://bugs.winehq.org/attachment.cgi?id=18694) ipstats patch Similar to bug 16661, but not quite a duplicate: If I apply the patch from bug 16661: ccache gcc -c -I. -I. -I../../include -I../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/freetype2 -I/usr/X11R6/include -O2 -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/freetype2 -I/usr/X11R6/include -o ipstats.o ipstats.c ipstats.c:32:25: error: sys/timeout.h: No such file or directory In file included from ipstats.c:77: /usr/include/netinet/tcp_var.h:194: error: field 'segq' has incomplete type /usr/include/netinet/tcp_var.h:303: error: field 'timeq' has incomplete type ipstats.c: In function 'getArpTable': ipstats.c:1420: warning: array subscript has type 'char' ipstats.c:1446: warning: array subscript has type 'char' ipstats.c:1448: warning: array subscript has type 'char' *** Error code 1 Stop. make: stopped in /home/austin/wine-git/dlls/iphlpapi After a bit of searching, seems that segq/timeq are: struct ipqehead segq; /* sequencing queue */ struct ipqehead timeq; /* time sequenced queue. */ and struct ipqehead is defined inf /usr/include/netinet/ip_var.h: TAILQ_HEAD(ipqehead, ipqent); struct ipqent { TAILQ_ENTRY(ipqent) ipqe_q; union { struct ip *_ip; struct tcpiphdr *_tcp; } _ipqe_u1; struct mbuf *ipqe_m; /* point to first mbuf */ struct mbuf *ipre_mlast; /* point to last mbuf */ u_int8_t ipqe_mff; /* for IP fragmentation */ /* * The following are used in TCP reassembly */ TAILQ_ENTRY(ipqent) ipqe_timeq; u_int32_t ipqe_seq; u_int32_t ipqe_len; The attached patch, which is the patch from bug 16661, with #include tcp_var.h moved after including ip_var.h, fixes it for me, but is obviously a hack. Moving tcp_var after ip_var, however, may be fine, I need to test... -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=16931 --- Comment #1 from Austin English <austinenglish(a)gmail.com> 2009-01-15 04:34:11 --- I looked into this a bit more. There are actually 2 bugs: A) HAVE_NETINET_* aren't being defined. That's a problem in configure, because the dependencies are a lot different on Net/OpenBSD. I'm working on this one now. B) RTF_MULTICAST isn't available on Net/OpenBSD. I sent a patch for this: http://www.winehq.org/pipermail/wine-patches/2009-January/067737.html -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=16931 --- Comment #2 from Austin English <austinenglish(a)gmail.com> 2009-01-21 12:49:57 --- I sent a couple patches to fix the compile: http://www.winehq.org/pipermail/wine-patches/2009-January/068131.html http://www.winehq.org/pipermail/wine-patches/2009-January/068132.html The full functionality isn't there yet, as many of the net/netinet includes aren't quite working. The only way I've found to fix it is to rewrite a lot of configure.ac to fix the includes, but I'm trying to see if I can reorder some to make it cleaner. With these two patches + git, however, build works again. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=16931 --- Comment #3 from Austin English <austinenglish(a)gmail.com> 2009-01-28 10:05:00 --- The includes should be fixed now on FreeBSD/NetBSD/OpenBSD. On NetBSD/OpenBSD, problems still remain because of incomplete/broken headers: ipstats.c:326: error: 'struct icmpstat' has no member named 'icps_outhist' ... ipstats.c:907: error: invalid application of 'sizeof' to incomplete type 'struct xinpgen' ... ipstats.c:941: error: 'struct inpcb' has no member named 'inp_gencnt' ... ipstats.c:945: error: 'struct inpcb' has no member named 'inp_vflag' ... ipstats.c:945: error: 'INP_IPV4' undeclared (first use in this function) ... ipstats.c:946: error: 'INP_IPV6' undeclared (first use in this function) The icps_outhist errors I tried fixing by using 'ifndef icps_outhist...', but that didn't work. Replacing the NetBSD headers with the FreeBSD headers got things a bit further, then failed because of missing includes. I asked Juan (original author of the code), and he replied with this help:
ipstats.c:326: error: 'struct icmpstat' has no member named 'icps_outhist'
For this one, you'll want to check whether struct icmpstat has the icps_outhist member or not. AC_CHECK_MEMBERS is the appropriate configure.ac check.
ipstats.c:907: error: invalid application of 'sizeof' to incomplete type 'struct xinpgen'
That needs a configure check too, probably AC_CHECK_TYPE. The #ifdef before it should be changed to HAVE_XINPGEN or whatever it is that gets defined by the configure check.
ipstats.c:941: error: 'struct inpcb' has no member named 'inp_gencnt' ipstats.c:945: error: 'struct inpcb' has no member named 'inp_vflag'
These also need a AC_CHECK_MEMBERS configure check.
ipstats.c:945: error: 'INP_IPV4' undeclared (first use in this function) ipstats.c:946: error: 'INP_IPV6' undeclared (first use in this function)
These two should disappear if you don't access the code unless struct inpcb has a inp_vflag member. So now, I'm working on updating configure.ac for these struct checks. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=16931 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #4 from Austin English <austinenglish(a)gmail.com> 2009-02-02 11:06:04 --- Fixed now. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=16931 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #5 from Alexandre Julliard <julliard(a)winehq.org> 2009-02-13 11:11:27 --- Closing bugs fixed in 1.1.15. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org