Commit 48ac79b1883981f5135b5b9c76ca268e6cbe65b2

Guillem Jover 2015-12-12T14:27:12

Use the non-overlayed libbsd headers when we need our own definitions

diff --git a/include/bsd/err.h b/include/bsd/err.h
index b465c1b..12fd051 100644
--- a/include/bsd/err.h
+++ b/include/bsd/err.h
@@ -34,7 +34,11 @@
 #ifndef LIBBSD_ERR_H
 #define LIBBSD_ERR_H
 
+#ifdef LIBBSD_OVERLAY
 #include <sys/cdefs.h>
+#else
+#include <bsd/sys/cdefs.h>
+#endif
 
 #include <stdarg.h>
 
diff --git a/include/bsd/unistd.h b/include/bsd/unistd.h
index 78a4525..1f9c5f8 100644
--- a/include/bsd/unistd.h
+++ b/include/bsd/unistd.h
@@ -34,7 +34,11 @@
 #ifndef LIBBSD_UNISTD_H
 #define LIBBSD_UNISTD_H
 
+#ifdef LIBBSD_OVERLAY
 #include <sys/cdefs.h>
+#else
+#include <bsd/sys/cdefs.h>
+#endif
 #include <sys/stat.h>
 
 #ifndef S_ISTXT