  #include <sys/types.h>
  #include <stdint.h>
 diff --git a/include/bsd/stdio.h b/include/bsd/stdio.h
-index 4b69983..8e2ac75 100644
+index 4b69983..c75151b 100644
 --- a/include/bsd/stdio.h
 +++ b/include/bsd/stdio.h
 @@ -48,12 +48,16 @@

+		os_is_macosx=false
+		nonLinuxOS=false
+		;;
+esac
+AM_CONDITIONAL([IS_DARWIN], [test x$os_is_macosx = xtrue])
+AM_COND_IF([IS_DARWIN],
+	[AC_DEFINE([IS_DARWIN], [1], [Get HostOS Type is Darwin])])

+}
 #endif
diff --git a/src/funopen.c b/src/funopen.c
index 1e05c7e..75e61ea 100644
--- a/src/funopen.c
+++ b/src/funopen.c
@@ -143,6 +143,7 @@ funopen(const void *cookie,
  * they will not add the needed support to implement it. Just ignore this
  * interface there, as it has never been provided anyway.
  */
+#elif defined(darwin) || defined(__APPLE__) || defined(MACOSX)
 #else
 #error "Function funopen() needs to be ported or disabled."
 #endif
diff --git a/src/getentropy.c b/src/getentropy.c
index 3f11a1e..8a23a07 100644
--- a/src/getentropy.c
