diff --git a/include/safe_lib_errno.h b/include/safe_lib_errno.h
index 8f27111..b997099 100644
--- a/include/safe_lib_errno.h
+++ b/include/safe_lib_errno.h
@@ -36,7 +36,9 @@
 #ifdef __KERNEL__
 # include <linux/errno.h>
 #else
+#ifndef __LOCAL_ERRNO__
 #include <errno.h>
+#endif
 #endif /* __KERNEL__ */
 
 /*
diff --git a/include/safe_types.h b/include/safe_types.h
index dba7474..a37d3f9 100644
--- a/include/safe_types.h
+++ b/include/safe_types.h
@@ -58,7 +58,9 @@ typedef int errno_t;
 
 #include <inttypes.h>
 #include <stdint.h>
+#ifndef __LOCAL_ERRNO__
 #include <errno.h>
+#endif
 
 typedef int errno_t;