Hiding a lot of <sys/pool.h> from userland breaks the build of the extent test in regress/sys/kern/extent on amd64. Additionally, tedu's added size variable in free(9) breaks the userland macros in sys/kern/subr_extent.c. The following patch addresses these two issues.
Index: sys/sys/pool.h =================================================================== RCS file: /cvs/src/sys/sys/pool.h,v retrieving revision 1.47 diff -u -p -r1.47 pool.h --- sys/sys/pool.h 2 Jul 2014 00:23:36 -0000 1.47 +++ sys/sys/pool.h 5 Aug 2014 19:13:24 -0000 @@ -66,7 +66,7 @@ struct kinfo_pool { unsigned long pr_nidle; /* # of idle pages */ }; -#if defined(_KERNEL) || defined(_LIBKVM) +#if defined(_KERNEL) || defined(_LIBKVM) || defined(_EXTENT_TESTING) #include <sys/queue.h> #include <sys/tree.h> @@ -158,7 +158,7 @@ struct pool { pr_crange; }; -#endif /* _KERNEL || _LIBKVM */ +#endif /* _KERNEL || _LIBKVM || _EXTENT_TESTING */ #ifdef _KERNEL Index: sys/kern/subr_extent.c =================================================================== RCS file: /cvs/src/sys/kern/subr_extent.c,v retrieving revision 1.51 diff -u -p -r1.51 subr_extent.c --- sys/kern/subr_extent.c 12 Jul 2014 18:43:32 -0000 1.51 +++ sys/kern/subr_extent.c 5 Aug 2014 19:13:24 -0000 @@ -58,13 +58,13 @@ #include <string.h> #define malloc(s, t, flags) malloc(s) -#define free(p, t) free(p) +#define free(p, t, s) free(p) #define tsleep(chan, pri, str, timo) (EWOULDBLOCK) #define wakeup(chan) ((void)0) #define pool_get(pool, flags) malloc((pool)->pr_size, 0, 0) #define pool_init(a, b, c, d, e, f, g) (a)->pr_size = (b) #define pool_setipl(pool, ipl) /* nothing */ -#define pool_put(pool, rp) free((rp), 0) +#define pool_put(pool, rp) free((rp), 0, 0) #define panic printf #endif