summaryrefslogtreecommitdiff
path: root/AK/kmalloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'AK/kmalloc.h')
-rw-r--r--AK/kmalloc.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/AK/kmalloc.h b/AK/kmalloc.h
index 2c5c2bdb4f..24f48f376f 100644
--- a/AK/kmalloc.h
+++ b/AK/kmalloc.h
@@ -1,7 +1,11 @@
#pragma once
#ifdef SERENITY
+#ifdef USERLAND
+#include <LibC/stdlib.h>
+#else
#include <Kernel/kmalloc.h>
+#endif
#else
#include <new>
@@ -10,7 +14,7 @@
extern "C" {
void* kcalloc(size_t nmemb, size_t size);
-void* kmalloc(size_t size) __attribute__ ((malloc));
+void* kmalloc(size_t size) MALLOC_ATTR;
void kfree(void* ptr);
void* krealloc(void* ptr, size_t size);