Hide linux specific headers
diff --git a/debug.h b/debug.h
index 52e8e96..54710a4 100644
--- a/debug.h
+++ b/debug.h
@@ -1,7 +1,9 @@
 #ifndef _DEBUG_H
 #define _DEBUG_H
 
+#ifdef	__linux__
 #include <features.h>
+#endif
 
 /* debug levels:
  */
diff --git a/ltrace-elf.c b/ltrace-elf.c
index ab1d505..14826c0 100644
--- a/ltrace-elf.c
+++ b/ltrace-elf.c
@@ -1,7 +1,9 @@
 #include "config.h"
 
 #include <assert.h>
+#ifdef	__linux__
 #include <endian.h>
+#endif
 #include <errno.h>
 #include <fcntl.h>
 #include <gelf.h>