From fe0619f78f9588611e14f75cd35b8955c92f834e Mon Sep 17 00:00:00 2001 From: cy Date: Sun, 3 Feb 2019 05:26:10 +0000 Subject: [PATCH] new_kmem_alloc(9) is a Solaris/illumos malloc(9). FreeBSD and NetBSD never get here, however a test for SOLARIS, as redundant as this test is, serves to document that this is the illumos definition. This should help those who come after me to follow the code more easily. MFC after: 1 month --- sys/contrib/ipfilter/netinet/ip_compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h index 03cd97e3c8e..777495b39ae 100644 --- a/sys/contrib/ipfilter/netinet/ip_compat.h +++ b/sys/contrib/ipfilter/netinet/ip_compat.h @@ -590,7 +590,7 @@ MALLOC_DECLARE(M_IPFILTER); # define COPYOUT(a,b,c) (bcopy((caddr_t)(a), (caddr_t)(b), (c)), 0) # endif -# ifndef KMALLOC +# if SOLARIS && !defined(KMALLOC) # define KMALLOC(a,b) (a) = (b)new_kmem_alloc(sizeof(*(a)), \ KMEM_NOSLEEP) # define KMALLOCS(a,b,c) (a) = (b)new_kmem_alloc((c), KMEM_NOSLEEP) -- 2.45.0