Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kmem_alloc(), kmem_free() undeclared.



For those at home (until a fix is committed):


strathcona# diff -bu ./sys/dev/usb/usb_subr.old ./sys/dev/usb/usb_subr.c
--- ./sys/dev/usb/usb_subr.old  2016-01-06 21:22:02.000000000 -0800
+++ ./sys/dev/usb/usb_subr.c    2016-01-06 20:56:23.000000000 -0800
@@ -32,6 +32,7 @@
  */

 #include <sys/cdefs.h>
+#include <sys/kmem.h>

 __KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.207 2016/01/06 22:12:49
skrll Exp $");



-bch

On 1/6/16, bch <brad.harder%gmail.com@localhost> wrote:
> /usr/src/sys/dev/usb/usb_subr.c:176:2: error: implicit declaration of
> function 'kmem_alloc' [-Werror=implicit-function-declaration]
>   char *b = kmem_alloc(USB_MAX_ENCODED_STRING_LEN, KM_SLEEP);
>   ^
> /usr/src/sys/dev/usb/usb_subr.c:176:51: error: 'KM_SLEEP' undeclared
> (first use in this function)
>   char *b = kmem_alloc(USB_MAX_ENCODED_STRING_LEN, KM_SLEEP);
>                                                    ^
> /usr/src/sys/dev/usb/usb_subr.c:176:51: note: each undeclared
> identifier is reported only once for each function it appears in
> /usr/src/sys/dev/usb/usb_subr.c:180:4: error: implicit declaration of
> function 'kmem_free' [-Werror=implicit-function-declaration]
>     kmem_free(b, USB_MAX_ENCODED_STRING_LEN);
>     ^
>


Home | Main Index | Thread Index | Old Index