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 b66cc977e145eaa74a7e9fe52a4a2e995c81ad02)
@@ -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(...)
