Index: uspace/app/bdsh/cmds/modules/sleep/sleep.c
===================================================================
--- uspace/app/bdsh/cmds/modules/sleep/sleep.c	(revision 1938b38120879a10d12c80cb608572f7059304f5)
+++ uspace/app/bdsh/cmds/modules/sleep/sleep.c	(revision 3f7fe9e91d327467121a08ebb9f0aca902ff737a)
@@ -66,6 +66,6 @@
 {
 	errno_t ret;
-	sec_t whole_seconds;
-	usec_t frac_seconds;
+	int64_t whole_seconds;
+	int64_t frac_seconds;
 	const char *endptr;
 
Index: uspace/lib/c/arch/ia64/include/libarch/fibril_context.h
===================================================================
--- uspace/lib/c/arch/ia64/include/libarch/fibril_context.h	(revision 1938b38120879a10d12c80cb608572f7059304f5)
+++ uspace/lib/c/arch/ia64/include/libarch/fibril_context.h	(revision 3f7fe9e91d327467121a08ebb9f0aca902ff737a)
@@ -76,4 +76,5 @@
 
 #include <stdint.h>
+#include <_bits/int128_t.h>
 
 // Only save registers that must be preserved across function calls.
Index: uspace/lib/c/generic/io/io.c
===================================================================
--- uspace/lib/c/generic/io/io.c	(revision 1938b38120879a10d12c80cb608572f7059304f5)
+++ uspace/lib/c/generic/io/io.c	(revision 3f7fe9e91d327467121a08ebb9f0aca902ff737a)
@@ -37,4 +37,5 @@
 #include <str.h>
 #include <errno.h>
+#include <limits.h>
 #include <stdbool.h>
 #include <stdlib.h>
Index: uspace/lib/c/generic/time.c
===================================================================
--- uspace/lib/c/generic/time.c	(revision 1938b38120879a10d12c80cb608572f7059304f5)
+++ uspace/lib/c/generic/time.c	(revision 3f7fe9e91d327467121a08ebb9f0aca902ff737a)
@@ -44,4 +44,5 @@
 #include <ddi.h>
 #include <libc.h>
+#include <limits.h>
 #include <stdint.h>
 #include <stdio.h>
Index: uspace/lib/c/include/limits.h
===================================================================
--- uspace/lib/c/include/limits.h	(revision 1938b38120879a10d12c80cb608572f7059304f5)
+++ 	(revision )
@@ -1,51 +1,0 @@
-/*
- * Copyright (c) 2017 Jiri Svoboda
- * 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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_LIMITS_H_
-#define LIBC_LIMITS_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <_bits/limits.h>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/stdint.h
===================================================================
--- uspace/lib/c/include/stdint.h	(revision 1938b38120879a10d12c80cb608572f7059304f5)
+++ 	(revision )
@@ -1,51 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_STDINT_H_
-#define LIBC_STDINT_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <_bits/stdint.h>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-/** @}
- */
Index: uspace/lib/pcm/src/format.c
===================================================================
--- uspace/lib/pcm/src/format.c	(revision 1938b38120879a10d12c80cb608572f7059304f5)
+++ uspace/lib/pcm/src/format.c	(revision 3f7fe9e91d327467121a08ebb9f0aca902ff737a)
@@ -39,4 +39,5 @@
 #include <macros.h>
 #include <stdio.h>
+#include <inttypes.h>
 
 #include "format.h"
Index: uspace/lib/posix/include/posix/limits.h
===================================================================
--- uspace/lib/posix/include/posix/limits.h	(revision 1938b38120879a10d12c80cb608572f7059304f5)
+++ uspace/lib/posix/include/posix/limits.h	(revision 3f7fe9e91d327467121a08ebb9f0aca902ff737a)
@@ -36,8 +36,9 @@
 #define POSIX_LIMITS_H_
 
-#include <libc/limits.h>
+#include_next <limits.h>
 
-#undef PATH_MAX
+#ifndef PATH_MAX
 #define PATH_MAX 256
+#endif
 
 #endif /* POSIX_LIMITS_H_ */
