Index: uspace/app/killall/killall.c
===================================================================
--- uspace/app/killall/killall.c	(revision 3e67ab12bbb2df2b1ef285b00f3b1336a5d82d17)
+++ uspace/app/killall/killall.c	(revision c19667106913b684f8620943caecb3fdab81ea38)
@@ -36,4 +36,5 @@
 #include <errno.h>
 #include <stdio.h>
+#include <unistd.h>
 #include <task.h>
 #include <stats.h>
Index: uspace/app/msim/Makefile
===================================================================
--- uspace/app/msim/Makefile	(revision c19667106913b684f8620943caecb3fdab81ea38)
+++ uspace/app/msim/Makefile	(revision c19667106913b684f8620943caecb3fdab81ea38)
@@ -0,0 +1,99 @@
+#
+# Copyright (c) 2012 Vojtech Horky
+# 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.
+#
+
+USPACE_PREFIX = ../..
+BINARY = msim
+
+MSIM_VERSION = 1.3.8.1
+MSIM_DIST = msim-$(MSIM_VERSION)
+MSIM_TARBALL = $(MSIM_DIST).tar.bz2
+MSIM_MIRROR = http://d3s.mff.cuni.cz/~holub/sw/msim/
+
+MSIM_HELENOS_MAKEFILE = Makefile.msim.src
+MSIM_HELENOS_PLATFORM_FILES = misc.c input.c
+MSIM_HELENOS_ARCH_DIR = arch/helenos
+MSIM_PATCHED_FILES = \
+	$(MSIM_DIST)/config.h \
+	$(MSIM_DIST)/src/$(MSIM_HELENOS_MAKEFILE) \
+	$(MSIM_DIST)/src/$(MSIM_HELENOS_ARCH_DIR)/helenos.h \
+	$(MSIM_DIST)/src/$(MSIM_HELENOS_ARCH_DIR)/misc.c \
+	$(MSIM_DIST)/src/$(MSIM_HELENOS_ARCH_DIR)/input.c
+
+MSIM_EXTRA_SOURCES := $(addprefix $(MSIM_HELENOS_ARCH_DIR)/,$(MSIM_HELENOS_PLATFORM_FILES))
+
+CP = /bin/cp -f
+
+all: $(BINARY)
+
+.PHONY: all clean unpack-tarball
+
+clean:
+	rm -rf msim Makefile.depend* *.map *.disasm $(MSIM_TARBALL) $(MSIM_DIST)
+
+$(BINARY): $(MSIM_DIST)/src/msim
+	$(CP) $< $@
+
+# Run make in MSIM src directory
+$(MSIM_DIST)/src/msim: $(MSIM_PATCHED_FILES) $(MSIM_DIST)/src/Makefile.sources Makefile 
+	cd $(MSIM_DIST)/src; make -f $(MSIM_HELENOS_MAKEFILE) USPACE_PREFIX=../../$(USPACE_PREFIX)
+	
+# Copy HelenOS specific files
+$(MSIM_DIST)/config.h: config.h.msim | unpack-tarball
+	$(CP) $< $@
+
+$(MSIM_DIST)/src/$(MSIM_HELENOS_ARCH_DIR)/helenos.h: arch_helenos/helenos.h | unpack-tarball
+	$(CP) $< $@
+
+$(MSIM_DIST)/src/$(MSIM_HELENOS_ARCH_DIR)/misc.c: arch_helenos/misc.c | unpack-tarball
+	$(CP) $< $@
+
+$(MSIM_DIST)/src/$(MSIM_HELENOS_ARCH_DIR)/input.c: arch_helenos/input.c | unpack-tarball
+	$(CP) $< $@
+
+$(MSIM_DIST)/src/$(MSIM_HELENOS_MAKEFILE): $(MSIM_HELENOS_MAKEFILE) | unpack-tarball
+	$(CP) $< $@
+
+# Extract list of sources, remove POSIX/Linux specific
+$(MSIM_DIST)/src/Makefile.sources: | unpack-tarball
+	cd $(MSIM_DIST)/src; ( \
+		echo 'all__:'; \
+		echo -e '\t@echo SOURCES = $$(SOURCES)'; cat Makefile.in \
+	) | make -f - | grep 'SOURCES' >Makefile.sources
+	sed \
+		-e 's:io/input.c:$(MSIM_EXTRA_SOURCES):' \
+		-e 's:debug/gdb.c::' \
+		-e 's:arch/posix/stdin.c::' \
+		-i $(MSIM_DIST)/src/Makefile.sources
+
+# Download tarball
+$(MSIM_TARBALL):
+	wget "$(MSIM_MIRROR)$(MSIM_TARBALL)" -O $(MSIM_TARBALL)
+
+unpack-tarball: $(MSIM_TARBALL)
+	tar xjf $(MSIM_TARBALL)
+	mkdir -p $(MSIM_DIST)/src/$(MSIM_HELENOS_ARCH_DIR)
Index: uspace/app/msim/Makefile.msim.src
===================================================================
--- uspace/app/msim/Makefile.msim.src	(revision c19667106913b684f8620943caecb3fdab81ea38)
+++ uspace/app/msim/Makefile.msim.src	(revision c19667106913b684f8620943caecb3fdab81ea38)
@@ -0,0 +1,38 @@
+#
+# Copyright (c) 2012 Vojtech Horky
+# 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.
+#
+
+
+BINARY = msim
+LIBS = $(LIBCLUI_PREFIX)/libclui.a
+POSIX_COMPAT = y
+# Needed because MSIM is not that strict as HelenOS
+EXTRA_CFLAGS = -Wno-error -I$(LIBCLUI_PREFIX)
+
+include Makefile.sources
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/app/msim/arch_helenos/helenos.h
===================================================================
--- uspace/app/msim/arch_helenos/helenos.h	(revision c19667106913b684f8620943caecb3fdab81ea38)
+++ uspace/app/msim/arch_helenos/helenos.h	(revision c19667106913b684f8620943caecb3fdab81ea38)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2012 Vojtech Horky
+ * 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 msim
+ * @{
+ */
+
+#ifndef MSIM_HELENOS_H_
+#define MSIM_HELENOS_H_
+
+char *helenos_input_get_next_command(void);
+void helenos_dprinter_init(void);
+
+#endif
+
+/**
+ * @}
+ */
+
Index: uspace/app/msim/arch_helenos/input.c
===================================================================
--- uspace/app/msim/arch_helenos/input.c	(revision c19667106913b684f8620943caecb3fdab81ea38)
+++ uspace/app/msim/arch_helenos/input.c	(revision c19667106913b684f8620943caecb3fdab81ea38)
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2012 Vojtech Horky
+ * 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 msim
+ * @{
+ */
+/** @file HelenOS specific functions for MSIM simulator.
+ */
+#include "../../io/input.h"
+#include "../../io/output.h"
+#include "../../fault.h"
+#include "helenos.h"
+#include <tinput.h>
+#include <errno.h>
+
+static tinput_t *input_prompt;
+
+/** Terminal and readline initialization
+ *
+ */
+void input_init(void)
+{
+	input_prompt = tinput_new();
+	if (input_prompt == NULL) {
+		die(1, "Failed to intialize input.");
+	}
+	helenos_dprinter_init();
+}
+
+void input_inter(void)
+{
+}
+
+void input_shadow( void)
+{
+}
+
+void input_back( void)
+{
+}
+
+char *helenos_input_get_next_command(void)
+{
+	tinput_set_prompt(input_prompt, "[msim] ");
+
+	char *commline = NULL;
+	int rc = tinput_read(input_prompt, &commline);
+
+	if (rc == ENOENT) {
+		rc = asprintf(&commline, "quit");
+		mprintf("Quit\n");
+		if (rc != EOK) {
+			exit(1);
+		}
+	}
+
+	/* On error, it remains NULL. */
+	return commline;
+}
+
+
+bool stdin_poll(char *key)
+{
+	kbd_event_t ev;
+	suseconds_t timeout = 0;
+	errno = EOK;
+	console_flush(input_prompt->console);
+	bool has_input = console_get_kbd_event_timeout(input_prompt->console, &ev, &timeout);
+	if (!has_input) {
+		return false;
+	}
+
+	if (ev.type != KEY_PRESS)
+		return false;
+
+	*key = ev.c;
+
+	return true;
+}
+
Index: uspace/app/msim/arch_helenos/misc.c
===================================================================
--- uspace/app/msim/arch_helenos/misc.c	(revision c19667106913b684f8620943caecb3fdab81ea38)
+++ uspace/app/msim/arch_helenos/misc.c	(revision c19667106913b684f8620943caecb3fdab81ea38)
@@ -0,0 +1,149 @@
+/*
+ * Copyright (c) 2012 Vojtech Horky
+ * 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 msim
+ * @{
+ */
+/** @file HelenOS specific functions for MSIM simulator.
+ */
+#include "../../io/input.h"
+#include "../../io/output.h"
+#include "../../device/dprinter.h"
+#include "../../debug/gdb.h"
+#include "../../cmd.h"
+#include "../../fault.h"
+#include "../../device/machine.h"
+#include "helenos.h"
+#include <str.h>
+#include <malloc.h>
+#include <ctype.h>
+#include <stdio.h>
+
+/* Define when the dprinter device shall try to filter
+ * out ANSI escape sequences.
+ */
+#define IGNORE_ANSI_ESCAPE_SEQUENCES
+/* Define when you want the ANSI escape sequences to be dumped as
+ * hex numbers.
+ */
+// #define DUMP_ANSI_ESCAPE_SEQUENCES
+
+void interactive_control(void)
+{
+	tobreak = false;
+
+	if (reenter) {
+		mprintf("\n");
+		reenter = false;
+	}
+
+	stepping = 0;
+
+	while (interactive) {
+		char *commline = helenos_input_get_next_command();
+		if (commline == NULL) {
+			mprintf("Quit\n");
+			input_back();
+			exit(1);
+		}
+
+		/* Check for empty input. */
+		if (str_cmp(commline, "") == 0) {
+			interpret("step");
+		} else {
+			interpret(commline);
+		}
+
+		free(commline);
+	}
+}
+
+bool gdb_remote_init(void)
+{
+	return false;
+}
+
+void gdb_session(void)
+{
+}
+
+void gdb_handle_event(gdb_event_t event)
+{
+}
+
+
+static void (*original_printer_write)(cpu_t *, device_s *, ptr_t, uint32_t);
+static void helenos_printer_write(cpu_t *cpu, device_s *dev, ptr_t addr, uint32_t val)
+{
+#ifdef IGNORE_ANSI_ESCAPE_SEQUENCES
+	static bool inside_ansi_escape = false;
+	static bool just_ended_ansi_escape = false;
+
+	if (inside_ansi_escape) {
+#ifdef DUMP_ANSI_ESCAPE_SEQUENCES
+		fprintf(stderr, "%02" PRIx32 "'%c' ", val, val >= 32 ? val : '?');
+#endif
+		if (isalpha((int) val)) {
+			just_ended_ansi_escape = true;
+			inside_ansi_escape = false;
+#ifdef DUMP_ANSI_ESCAPE_SEQUENCES
+			fprintf(stderr, " [END]\n");
+#endif
+		}
+
+		return;
+	}
+
+	if (val == 0x1B) {
+		inside_ansi_escape = true;
+
+		if (!just_ended_ansi_escape) {
+#ifdef DUMP_ANSI_ESCAPE_SEQUENCES
+			fprintf(stderr, "\n");
+#endif
+		}
+#ifdef DUMP_ANSI_ESCAPE_SEQUENCES
+		fprintf(stderr, "ESC sequence: ");
+#endif
+
+		return;
+	}
+
+	just_ended_ansi_escape = false;
+#endif
+
+	(*original_printer_write)(cpu, dev, addr, val);
+}
+
+void helenos_dprinter_init(void)
+{
+	original_printer_write = dprinter.write;
+	dprinter.write = helenos_printer_write;
+}
+
+
Index: uspace/app/msim/config.h.msim
===================================================================
--- uspace/app/msim/config.h.msim	(revision c19667106913b684f8620943caecb3fdab81ea38)
+++ uspace/app/msim/config.h.msim	(revision c19667106913b684f8620943caecb3fdab81ea38)
@@ -0,0 +1,108 @@
+/* config.h.  Generated from config.h.in by configure.  */
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have the <ctype.h> header file. */
+#define HAVE_CTYPE_H 1
+
+/* Define to 1 if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the <getopt.h> header file. */
+#define HAVE_GETOPT_H 1
+
+/* Define to 1 if you have the `getopt_long' function. */
+#define HAVE_GETOPT_LONG 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `readline' library (-lreadline). */
+#define HAVE_LIBREADLINE 1
+
+/* Define to 1 if you have the `wsock32' library (-lwsock32). */
+/* #undef HAVE_LIBWSOCK32 */
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <readline/history.h> header file. */
+#define HAVE_READLINE_HISTORY_H 1
+
+/* Define to 1 if you have the <readline/readline.h> header file. */
+#define HAVE_READLINE_READLINE_H 1
+
+/* Define to 1 if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H 1
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#define HAVE_STDARG_H 1
+
+/* Define to 1 if you have the <stdbool.h> header file. */
+#define HAVE_STDBOOL_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#define HAVE_STDIO_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <time.h> header file. */
+#define HAVE_TIME_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Name of package */
+#define PACKAGE "msim"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+#define VERSION "1.3.8.1"
+
+/* Define to 1 if your processor stores words with the most significant byte
+   first (like Motorola and SPARC, unlike Intel and VAX). */
+/* #undef WORDS_BIGENDIAN */
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* #undef size_t */
Index: uspace/app/nettest1/nettest1.c
===================================================================
--- uspace/app/nettest1/nettest1.c	(revision 3e67ab12bbb2df2b1ef285b00f3b1336a5d82d17)
+++ uspace/app/nettest1/nettest1.c	(revision c19667106913b684f8620943caecb3fdab81ea38)
@@ -40,4 +40,5 @@
 #include <malloc.h>
 #include <stdio.h>
+#include <unistd.h>
 #include <str.h>
 #include <task.h>
Index: uspace/app/nettest2/nettest2.c
===================================================================
--- uspace/app/nettest2/nettest2.c	(revision 3e67ab12bbb2df2b1ef285b00f3b1336a5d82d17)
+++ uspace/app/nettest2/nettest2.c	(revision c19667106913b684f8620943caecb3fdab81ea38)
@@ -40,4 +40,5 @@
 #include <malloc.h>
 #include <stdio.h>
+#include <unistd.h>
 #include <str.h>
 #include <task.h>
Index: uspace/app/sbi/src/mytypes.h
===================================================================
--- uspace/app/sbi/src/mytypes.h	(revision 3e67ab12bbb2df2b1ef285b00f3b1336a5d82d17)
+++ uspace/app/sbi/src/mytypes.h	(revision c19667106913b684f8620943caecb3fdab81ea38)
@@ -51,4 +51,6 @@
 /** Error return codes. */
 #include <errno.h>
+/** We need NULL defined. */
+#include <unistd.h>
 #define EOK 0
 
Index: uspace/app/sysinfo/sysinfo.c
===================================================================
--- uspace/app/sysinfo/sysinfo.c	(revision 3e67ab12bbb2df2b1ef285b00f3b1336a5d82d17)
+++ uspace/app/sysinfo/sysinfo.c	(revision c19667106913b684f8620943caecb3fdab81ea38)
@@ -36,4 +36,5 @@
 #include <errno.h>
 #include <stdio.h>
+#include <unistd.h>
 #include <sysinfo.h>
 #include <malloc.h>
Index: uspace/app/websrv/websrv.c
===================================================================
--- uspace/app/websrv/websrv.c	(revision 3e67ab12bbb2df2b1ef285b00f3b1336a5d82d17)
+++ uspace/app/websrv/websrv.c	(revision c19667106913b684f8620943caecb3fdab81ea38)
@@ -36,4 +36,5 @@
 #include <bool.h>
 #include <errno.h>
+#include <assert.h>
 #include <stdio.h>
 #include <sys/types.h>
