Index: Makefile =================================================================== --- Makefile (revision 465798) +++ Makefile (working copy) @@ -10,8 +10,6 @@ LICENSE= BSD2CLAUSE -BROKEN_armv6= fails to build: ng_ipacct_hash.h:52:2: implicit declaration of function 'MALLOC' is invalid in C99 -BROKEN_armv7= fails to build: ng_ipacct_hash.h:52:2: implicit declaration of function 'MALLOC' is invalid in C99 BROKEN_powerpc64= fails to build: pcpu.h: error: size of array '__assert_0' is negative USE_GITHUB= yes @@ -19,7 +17,8 @@ GH_ACCOUNT= vstakhov -MAKE_ENV= BINDIR="${PREFIX}/sbin" +MAKE_ARGS+= OSVERSION=${OSVERSION} +MAKE_ENV+= BINDIR="${PREFIX}/sbin" USE_RC_SUBR= ng_ipacct SUB_FILES= pkg-message @@ -34,4 +33,8 @@ ${INSTALL_DATA} ${FILESDIR}/ng_ipacct.conf \ ${STAGEDIR}${PREFIX}/etc/ng_ipacct.conf.sample +OPTIONS_DEFINE= VIMAGE +VIMAGE_DESC= VIMAGE virtual networking support +VIMAGE_CFLAGS= -DVIMAGE + .include Index: files/patch-ipacctctl_Makefile =================================================================== --- files/patch-ipacctctl_Makefile (revision 465798) +++ files/patch-ipacctctl_Makefile (working copy) @@ -1,6 +1,6 @@ ---- ipacctctl/Makefile.orig 2013-12-20 18:19:33.000000000 +0000 -+++ ipacctctl/Makefile 2013-12-20 18:19:52.000000000 +0000 -@@ -5,12 +5,7 @@ +--- ipacctctl/Makefile.orig 2015-03-04 10:19:32 UTC ++++ ipacctctl/Makefile +@@ -5,14 +5,19 @@ BINDIR?= /usr/local/sbin PROG= ipacctctl @@ -7,9 +7,20 @@ -.if !exists(/usr/share/mk/bsd.compat.mk) -# Pre NOFOO -> NO_FOO system -NOMAN= YES --.else ++ ++.if defined(OSVERSION) ++.if ${OSVERSION} > 1100100 ++MK_MAN= no + .else ++NO_MAN= ++.endif ++.else ++MK_MAN= no NO_MAN= YES --.endif + .endif - COPTS+= -g -Wall -Wformat +-COPTS+= -g -Wall -Wformat ++CFLAGS+= -g -Wall -Wformat LDADD+= -lnetgraph + + .include Index: files/patch-ng__ipacct_ng__ipacct__hash.h =================================================================== --- files/patch-ng__ipacct_ng__ipacct__hash.h (nonexistent) +++ files/patch-ng__ipacct_ng__ipacct__hash.h (working copy) @@ -0,0 +1,15 @@ +--- ng_ipacct/ng_ipacct_hash.h.orig 2015-03-04 10:19:32 UTC ++++ ng_ipacct/ng_ipacct_hash.h +@@ -36,6 +36,12 @@ + #define NG_IPACCT_HASH1(faddr)\ + ((faddr ^ (faddr >> 23) ^ (faddr >> 17))) + ++#ifndef MALLOC ++#define MALLOC(space, cast, size, type, flags) \ ++ ((space) = (cast)malloc((u_long)(size), (type), (flags))) ++#define FREE(addr, type) free((addr), (type)) ++#endif ++ + struct ip_acct_hash { + struct rmlock bl; + SLIST_HEAD (, ip_acct_chunk) head; Property changes on: files/patch-ng__ipacct_ng__ipacct__hash.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: files/patch-ng_ipacct.c =================================================================== --- files/patch-ng_ipacct.c (revision 465798) +++ files/patch-ng_ipacct.c (working copy) @@ -1,6 +1,32 @@ ---- ng_ipacct/ng_ipacct.c.orig 2015-03-16 13:38:23.000000000 +0700 -+++ ng_ipacct/ng_ipacct.c 2015-03-16 13:46:21.000000000 +0700 -@@ -965,7 +965,11 @@ pcb_get_cred(struct ip_acct_stream *r, s +--- ng_ipacct/ng_ipacct.c.orig 2015-03-04 10:19:32 UTC ++++ ng_ipacct/ng_ipacct.c +@@ -44,6 +44,7 @@ static const char rcs_id[] = + #include + #include + #include ++#include + + #include + #include +@@ -891,7 +892,7 @@ ip_hash_make_rec(hinfo_p hip, struct mbu + } + r->r_ports = *(mtod(*m, u_int32_t *)); + if (hip->hi.hi_flags & HI_SAVE_UID) +- r->r_uid = pcb_get_cred(r, &tcbinfo); ++ r->r_uid = pcb_get_cred(r, &V_tcbinfo); + break; + case IPPROTO_UDP: + if ((error = +@@ -903,7 +904,7 @@ ip_hash_make_rec(hinfo_p hip, struct mbu + } + r->r_ports = *(mtod(*m, u_int32_t *)); + if (hip->hi.hi_flags & HI_SAVE_UID) +- r->r_uid = pcb_get_cred(r, &udbinfo); ++ r->r_uid = pcb_get_cred(r, &V_udbinfo); + break; + case IPPROTO_ICMP: + { +@@ -965,7 +966,11 @@ pcb_get_cred(struct ip_acct_stream *r, s int i; uid_t res; @@ -12,7 +38,7 @@ for (i = 0, ina = r->r_dst, port = r->r_dport; i < 2; i++) { #if __FreeBSD_version >= 700110 pcb = in_pcblookup_local(pcbinfo, ina, port, 1, NOCRED); -@@ -984,6 +988,10 @@ pcb_get_cred(struct ip_acct_stream *r, s +@@ -984,6 +989,10 @@ pcb_get_cred(struct ip_acct_stream *r, s (pcb->inp_socket != NULL) && (pcb->inp_socket->so_cred != NULL)) { res = pcb->inp_socket->so_cred->cr_uid; }