diff options
Diffstat (limited to 'sys/netinet/libalias/alias_local.h')
-rw-r--r-- | sys/netinet/libalias/alias_local.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/netinet/libalias/alias_local.h b/sys/netinet/libalias/alias_local.h index 34f91e3..63f6288 100644 --- a/sys/netinet/libalias/alias_local.h +++ b/sys/netinet/libalias/alias_local.h @@ -48,6 +48,19 @@ #include <sys/queue.h> +/* Use kernel allocator. */ +#if defined(_KERNEL) && defined(_SYS_MALLOC_H_) +MALLOC_DECLARE(M_ALIAS); +#define malloc(x) malloc(x, M_ALIAS, M_NOWAIT|M_ZERO) +#define calloc(x, n) malloc(x*n) +#define free(x) free(x, M_ALIAS) +#endif + +/* XXX: LibAliasSetTarget() uses this constant. */ +#ifdef _KERNEL +#define INADDR_NONE 0xffffffff +#endif + /* Sizes of input and output link tables */ #define LINK_TABLE_OUT_SIZE 101 #define LINK_TABLE_IN_SIZE 4001 |