summaryrefslogtreecommitdiff
path: root/usr/src/common/smbsrv/smb_msgbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/common/smbsrv/smb_msgbuf.c')
-rw-r--r--usr/src/common/smbsrv/smb_msgbuf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr/src/common/smbsrv/smb_msgbuf.c b/usr/src/common/smbsrv/smb_msgbuf.c
index 2530a4f5ef..ff94a6243b 100644
--- a/usr/src/common/smbsrv/smb_msgbuf.c
+++ b/usr/src/common/smbsrv/smb_msgbuf.c
@@ -21,6 +21,8 @@
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
*/
/*
@@ -33,7 +35,7 @@
#include <sys/types.h>
#include <sys/varargs.h>
#include <sys/byteorder.h>
-#ifndef _KERNEL
+#if !defined(_KERNEL) && !defined(_FAKE_KERNEL)
#include <stdlib.h>
#include <syslog.h>
#include <string.h>
@@ -161,7 +163,7 @@ smb_msgbuf_term(smb_msgbuf_t *mb)
while (item) {
tmp = item;
item = item->next;
-#ifndef _KERNEL
+#if !defined(_KERNEL) && !defined(_FAKE_KERNEL)
free(tmp);
#else
kmem_free(tmp, tmp->size);
@@ -645,7 +647,7 @@ smb_msgbuf_malloc(smb_msgbuf_t *mb, size_t size)
size += sizeof (smb_msgbuf_mlist_t);
-#ifndef _KERNEL
+#if !defined(_KERNEL) && !defined(_FAKE_KERNEL)
if ((item = malloc(size)) == NULL)
return (NULL);
#else