summaryrefslogtreecommitdiff
path: root/AK/kmalloc.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-10-25 10:00:37 +0200
committerAndreas Kling <awesomekling@gmail.com>2018-10-25 10:02:04 +0200
commit16f318408d26ed4f22ee968321ad908b5bc6e450 (patch)
treebdf61b8e81477355b29a9b22d0cc05b1625815c9 /AK/kmalloc.h
parentec1d16b307e1467391d5d314bf700cb151ca96f4 (diff)
downloadserenity-16f318408d26ed4f22ee968321ad908b5bc6e450.zip
ELFLoader should fail with an error message for unresolved symbols.
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);