Index: uspace/lib/c/generic/elf/elf_load.c
===================================================================
--- uspace/lib/c/generic/elf/elf_load.c	(revision 17341d4bc043c59499d012d2496df6c02d40fc79)
+++ uspace/lib/c/generic/elf/elf_load.c	(revision 27f67f53b292b6b11b45be192ec9f6146a87fd85)
@@ -36,10 +36,13 @@
  */
 
+#include <elf/elf_load.h>
+#include <elf/elf_mod.h>
 #include <errno.h>
 #include <stdio.h>
-#include <elf/elf_load.h>
-#include <elf/elf_mod.h>
+#include <stdlib.h>
+
+#ifdef CONFIG_RTLD
 #include <rtld/rtld.h>
-
+#endif
 
 #define DPRINTF(...)
