From 6309459839e49129487a38d7c6aa16c2991f57ea Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Sat, 23 Sep 2017 13:31:34 +0200 Subject: [PATCH] macOS: add a workaround to build with newer SDKs SDK 10.13 (and possibly olders as well) need HAVE_UNISTD_H to be set to a value if available otherwise the following error is thrown: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/dispatch/dispatch.h:38:45: error: expected value in expression #if !defined(HAVE_UNISTD_H) || HAVE_UNISTD_H --- config.h.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config.h.in b/config.h.in index b634b53..f6850c8 100644 --- a/config.h.in +++ b/config.h.in @@ -3,7 +3,11 @@ /* Include files */ #cmakedefine HAVE_FCNTL_H +#if defined(__APPLE__) && !defined(__IOS__) +#cmakedefine01 HAVE_UNISTD_H +#else #cmakedefine HAVE_UNISTD_H +#endif #cmakedefine HAVE_INTTYPES_H #cmakedefine HAVE_SYS_MODEM_H #cmakedefine HAVE_SYS_FILIO_H -- 2.7.4