Index: kernel/arch/riscv64/include/arch/mm/km.h
===================================================================
--- kernel/arch/riscv64/include/arch/mm/km.h	(revision cbc3587f1c1b12b55c63438c17c73b8c48edf6d6)
+++ kernel/arch/riscv64/include/arch/mm/km.h	(revision 10d65d70906a865fb116576edc88e47ab61a5fb4)
@@ -38,4 +38,5 @@
 #include <stdbool.h>
 #include <stddef.h>
+#include <stdint.h>
 
 #define KM_RISCV64_IDENTITY_START      UINT64_C(0xffff800000000000)
Index: kernel/generic/include/stdarg.h
===================================================================
--- kernel/generic/include/stdarg.h	(revision cbc3587f1c1b12b55c63438c17c73b8c48edf6d6)
+++ 	(revision )
@@ -1,53 +1,0 @@
-/*
- * Copyright (c) 2005 Jakub Jermar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup generic
- * @{
- */
-/** @file
- */
-
-/*
- * Variable argument list manipulation macros
- * for all architectures with compiler support for __builtin_va_*.
- */
-
-#ifndef KERN_STDARG_H_
-#define KERN_STDARG_H_
-
-typedef __builtin_va_list va_list;
-
-#define va_start(ap, last)  __builtin_va_start(ap, last)
-#define va_arg(ap, type)    __builtin_va_arg(ap, type)
-#define va_end(ap)          __builtin_va_end(ap)
-#define va_copy(dst, src)   __builtin_va_copy(dst, src)
-
-#endif
-
-/** @}
- */
Index: kernel/generic/include/stdbool.h
===================================================================
--- kernel/generic/include/stdbool.h	(revision cbc3587f1c1b12b55c63438c17c73b8c48edf6d6)
+++ 	(revision )
@@ -1,48 +1,0 @@
-/*
- * Copyright (c) 2006 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup generic
- * @{
- */
-/** @file
- */
-
-#ifndef KERN_BOOL_H_
-#define KERN_BOOL_H_
-
-#include <abi/bool.h>
-
-#define false  0
-#define true   1
-
-#define __bool_true_false_are_defined  1
-
-#endif
-
-/** @}
- */
Index: kernel/generic/include/stddef.h
===================================================================
--- kernel/generic/include/stddef.h	(revision cbc3587f1c1b12b55c63438c17c73b8c48edf6d6)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*
- * Copyright (c) 2006 Josef Cejka
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup generic
- * @{
- */
-/** @file
- */
-
-#ifndef KERN_STDDEF_H_
-#define KERN_STDDEF_H_
-
-#include <arch/types.h>
-
-#include <_bits/NULL.h>
-
-#define offsetof(type,member) ((size_t) &(((type *) 0)->member))
-
-#endif
-
-/** @}
- */
Index: kernel/generic/src/cap/cap.c
===================================================================
--- kernel/generic/src/cap/cap.c	(revision cbc3587f1c1b12b55c63438c17c73b8c48edf6d6)
+++ kernel/generic/src/cap/cap.c	(revision 10d65d70906a865fb116576edc88e47ab61a5fb4)
@@ -81,4 +81,5 @@
 #include <adt/list.h>
 
+#include <limits.h>
 #include <stdint.h>
 
Index: kernel/test/print/print2.c
===================================================================
--- kernel/test/print/print2.c	(revision cbc3587f1c1b12b55c63438c17c73b8c48edf6d6)
+++ kernel/test/print/print2.c	(revision 10d65d70906a865fb116576edc88e47ab61a5fb4)
@@ -30,4 +30,5 @@
 #include <stddef.h>
 #include <test.h>
+#include <typedefs.h>
 
 const char *test_print2(void)
Index: kernel/test/print/print4.c
===================================================================
--- kernel/test/print/print4.c	(revision cbc3587f1c1b12b55c63438c17c73b8c48edf6d6)
+++ kernel/test/print/print4.c	(revision 10d65d70906a865fb116576edc88e47ab61a5fb4)
@@ -30,4 +30,5 @@
 #include <stddef.h>
 #include <test.h>
+#include <typedefs.h>
 
 const char *test_print4(void)
