diff --git a/configure b/configure index dfcded4..9075b97 100755 --- a/configure +++ b/configure @@ -6310,6 +6310,7 @@ case "$host" in LIBS="$LIBS -framework OpenGL" LIBS="$LIBS -framework OpenAL" build_macosx="yes" + CFLAGS="$CFLAGS -DHAVE_UNISTD_H" ;; *-*-cygwin* | *-*-mingw32*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lopengl32" >&5 diff --git a/configure.ac b/configure.ac index 20a6d09..3a89aff 100644 --- a/configure.ac +++ b/configure.ac @@ -140,6 +140,7 @@ case "$host" in LIBS="$LIBS -framework OpenGL" LIBS="$LIBS -framework OpenAL" build_macosx="yes" + CFLAGS="$CFLAGS -DHAVE_UNISTD_H" ;; *-*-cygwin* | *-*-mingw32*) AC_CHECK_LIB([opengl32], [main], [], \ diff --git a/src/slirp/slirp.h b/src/slirp/slirp.h index 416b402..6e15943 100644 --- a/src/slirp/slirp.h +++ b/src/slirp/slirp.h @@ -80,6 +80,10 @@ typedef char *SLIRPcaddr_t; # include #endif +#ifdef HAVE_UNISTD_H +# include +#endif + #ifndef _MSC_VER #include #else