diff --git a/Makefile b/Makefile
index 8ef431f..9a87d60 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ OBJS := main.o console.o
 LIBS_so := libvnc/libvnc.so
 LIBS := libvnc/libvnc.a
 
-CFLAGS  = -I$(shell pwd)/include
+CFLAGS  = -I$(shell pwd)/include -Wno-unused-result
 # _GNU_SOURCE for asprintf.
 CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE 
 CFLAGS += -Wall -Werror -g -O1 
diff --git a/main.c b/main.c
index 526e09f..9fd5ff3 100644
--- a/main.c
+++ b/main.c
@@ -43,11 +43,12 @@
 #include <sys/stat.h>
 #include <sys/wait.h>
 #include <sys/prctl.h>
+#include <sys/resource.h>
 
 #include <locale.h>
 
 #ifndef NXENSTORE
-#include <xs.h>
+#include <xenstore.h>
 #endif
 
 #if !defined(__APPLE__)
