Index: lib/libpfctl/Makefile =================================================================== --- lib/libpfctl/Makefile +++ lib/libpfctl/Makefile @@ -2,11 +2,16 @@ PACKAGE= lib${LIB} LIB= pfctl -INTERNALLIB= true +SHLIBDIR?= /lib SRCS= libpfctl.c INCS= libpfctl.h CFLAGS+=${PICFLAG} +#MK_PIE= yes +SHLIB_NAME= pfctl.so +LIBADD= nv + +#SHLIB_MAJOR= 0 .include Index: libexec/tftp-proxy/Makefile =================================================================== --- libexec/tftp-proxy/Makefile +++ libexec/tftp-proxy/Makefile @@ -6,8 +6,7 @@ SRCS= tftp-proxy.c filter.c MAN= tftp-proxy.8 -CFLAGS+= -I${SRCTOP}/lib/libpfctl -I${OBJTOP}/lib/libpfctl -LIBADD= pfctl +LIBADD= pfctl nv WARNS?= 3 Index: sbin/pfctl/Makefile =================================================================== --- sbin/pfctl/Makefile +++ sbin/pfctl/Makefile @@ -28,7 +28,7 @@ YFLAGS= -LIBADD= m md pfctl +LIBADD= m md pfctl nv HAS_TESTS= SUBDIR.${MK_TESTS}+= tests Index: share/mk/src.libnames.mk =================================================================== --- share/mk/src.libnames.mk +++ share/mk/src.libnames.mk @@ -57,7 +57,6 @@ opts \ parse \ pe \ - pfctl \ pmcstat \ sl \ sm \ @@ -89,6 +88,7 @@ 9p \ alias \ archive \ + pfctl \ asn1 \ avl \ be \ @@ -582,7 +582,7 @@ LIBPARSEDIR= ${_LIB_OBJTOP}/usr.sbin/ntp/libparse LIBPARSE?= ${LIBPARSEDIR}/libparse${PIE_SUFFIX}.a -LIBPFCTL= ${_LIB_OBJTOP}/lib/libpfctl +LIBPFCTLDIR= ${_LIB_OBJTOP}/lib/libpfctl LIBPFCTL?= ${LIBPFCTLDIR}/libpfctl${PIE_SUFFIX}.a LIBLPRDIR= ${_LIB_OBJTOP}/usr.sbin/lpr/common_source Index: sys/netpfil/pf/pf_ioctl.c =================================================================== --- sys/netpfil/pf/pf_ioctl.c +++ sys/netpfil/pf/pf_ioctl.c @@ -3206,7 +3206,7 @@ totlen = io->pfrio_size * sizeof(struct pfr_table); pfrts = mallocarray(io->pfrio_size, sizeof(struct pfr_table), - M_TEMP, M_NOWAIT); + M_TEMP, M_WAITOK); if (pfrts == NULL) { error = ENOMEM; break; @@ -3295,7 +3295,7 @@ } totlen = io->pfrio_size * sizeof(struct pfr_addr); pfras = mallocarray(io->pfrio_size, sizeof(struct pfr_addr), - M_TEMP, M_NOWAIT); + M_TEMP, M_WAITOK); if (! pfras) { error = ENOMEM; break; @@ -3333,7 +3333,7 @@ } totlen = io->pfrio_size * sizeof(struct pfr_addr); pfras = mallocarray(io->pfrio_size, sizeof(struct pfr_addr), - M_TEMP, M_NOWAIT); + M_TEMP, M_WAITOK); if (! pfras) { error = ENOMEM; break; @@ -3375,7 +3375,7 @@ } totlen = count * sizeof(struct pfr_addr); pfras = mallocarray(count, sizeof(struct pfr_addr), M_TEMP, - M_NOWAIT); + M_WAITOK); if (! pfras) { error = ENOMEM; break; @@ -3414,7 +3414,7 @@ } totlen = io->pfrio_size * sizeof(struct pfr_addr); pfras = mallocarray(io->pfrio_size, sizeof(struct pfr_addr), - M_TEMP, M_NOWAIT); + M_TEMP, M_WAITOK); if (! pfras) { error = ENOMEM; break; @@ -3446,7 +3446,7 @@ } totlen = io->pfrio_size * sizeof(struct pfr_astats); pfrastats = mallocarray(io->pfrio_size, - sizeof(struct pfr_astats), M_TEMP, M_NOWAIT); + sizeof(struct pfr_astats), M_TEMP, M_WAITOK); if (! pfrastats) { error = ENOMEM; break; @@ -3478,7 +3478,7 @@ } totlen = io->pfrio_size * sizeof(struct pfr_addr); pfras = mallocarray(io->pfrio_size, sizeof(struct pfr_addr), - M_TEMP, M_NOWAIT); + M_TEMP, M_WAITOK); if (! pfras) { error = ENOMEM; break; @@ -3516,7 +3516,7 @@ } totlen = io->pfrio_size * sizeof(struct pfr_addr); pfras = mallocarray(io->pfrio_size, sizeof(struct pfr_addr), - M_TEMP, M_NOWAIT); + M_TEMP, M_WAITOK); if (! pfras) { error = ENOMEM; break; @@ -3554,7 +3554,7 @@ } totlen = io->pfrio_size * sizeof(struct pfr_addr); pfras = mallocarray(io->pfrio_size, sizeof(struct pfr_addr), - M_TEMP, M_NOWAIT); + M_TEMP, M_WAITOK); if (! pfras) { error = ENOMEM; break; @@ -3607,7 +3607,7 @@ } totlen = sizeof(struct pfioc_trans_e) * io->size; ioes = mallocarray(io->size, sizeof(struct pfioc_trans_e), - M_TEMP, M_NOWAIT); + M_TEMP, M_WAITOK); if (! ioes) { error = ENOMEM; break; @@ -3684,7 +3684,7 @@ } totlen = sizeof(struct pfioc_trans_e) * io->size; ioes = mallocarray(io->size, sizeof(struct pfioc_trans_e), - M_TEMP, M_NOWAIT); + M_TEMP, M_WAITOK); if (! ioes) { error = ENOMEM; break; @@ -3763,7 +3763,7 @@ totlen = sizeof(struct pfioc_trans_e) * io->size; ioes = mallocarray(io->size, sizeof(struct pfioc_trans_e), - M_TEMP, M_NOWAIT); + M_TEMP, M_WAITOK); if (ioes == NULL) { error = ENOMEM; break; @@ -3970,7 +3970,7 @@ bufsiz = io->pfiio_size * sizeof(struct pfi_kif); ifstore = mallocarray(io->pfiio_size, sizeof(struct pfi_kif), - M_TEMP, M_NOWAIT); + M_TEMP, M_WAITOK); if (ifstore == NULL) { error = ENOMEM; break; Index: usr.sbin/authpf/Makefile =================================================================== --- usr.sbin/authpf/Makefile +++ usr.sbin/authpf/Makefile @@ -12,9 +12,8 @@ # XXX ALTQ: CFLAGS+= -DENABLE_ALTQ -CFLAGS+= -I${SRCTOP}/lib/libpfctl -I${OBJTOP}/lib/libpfctl -LIBADD= m util pfctl +LIBADD= m util pfctl nv WARNS?= 3 Index: usr.sbin/ftp-proxy/Makefile =================================================================== --- usr.sbin/ftp-proxy/Makefile +++ usr.sbin/ftp-proxy/Makefile @@ -8,9 +8,9 @@ SRCS= ftp-proxy.c filter.c CFLAGS+=-I${SRCTOP}/contrib/pf/libevent -CFLAGS+= -I${SRCTOP}/lib/libpfctl -I${OBJTOP}/lib/libpfctl +#CFLAGS+= -I${SRCTOP}/lib/libpfctl -I${OBJTOP}/lib/libpfctl -LIBADD= event1 pfctl +LIBADD= event1 pfctl nv WARNS?= 3