OK. I'd like to propose the following patch for ipfilter: Index: sys/contrib/ipfilter/netinet/ip_compat.h =================================================================== --- sys/contrib/ipfilter/netinet/ip_compat.h (revision 205838) +++ sys/contrib/ipfilter/netinet/ip_compat.h (working copy) @@ -975,7 +975,6 @@ # define SPL_NET(x) ; # define SPL_IMP(x) ; # define SPL_SCHED(x) ; -extern int in_cksum __P((struct mbuf *, int)); # else # define SPL_SCHED(x) x = splhigh() # endif /* __FreeBSD_version >= 500043 */
This declaration is wrong, and it prevents arm from building ipfilter. Why is it wrong? Because we have: # if (__FreeBSD_version >= 500002) # include <netinet/in_systm.h> # include <netinet/ip.h> # include <machine/in_cksum.h> # endif # if (__FreeBSD_version >= 500043) ... <the above code> ... # endif So, we have in_cksum.h being included *AND* we're defining this function. However, in_cksum.h is supposed to do this. Why don't we see problems today? No architecture except arm has an assembler in_cksum in the tree. All the other architectures have #define in_cksum(a, b) in_cksum_skip(a, b, 0) in their headers. Since the above extern uses __P to hide the args, in_cksum doesn't expand the macro, so we don't see any problems or conflicts. On arm, where we define in_cksum() correctly to return u_short, there's a conflict. So, it would best if we just dropped this one line from ip_compat.h, since it was always wrong anyway. Comments? Warner _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"