--- src/shrpx_config.cc~ 2017-07-02 10:46:31.000000000 +0200 +++ src/shrpx_config.cc 2017-07-09 22:29:41.000000000 +0200 @@ -43,6 +43,21 @@ #endif // HAVE_UNISTD_H #include <dirent.h> +#ifdef __APPLE__ // this block only for Macs +# ifndef __MAC_OS_X_VERSION_MIN_REQUIRED // are AvailabilityMacros.h or Availability.h not yet included? +# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 // then for Leopard and later… +# include <Availability.h> // …either include this… +# else +# include <AvailabilityMacros.h> // …or include that +# endif +# endif +# if __MAC_OS_X_VERSION_MIN_REQUIRED < 1060 // and for some OS versions do this… +# ifndef AI_NUMERICSERV +# define AI_NUMERICSERV 0 +# endif +# endif // finish OS version discrimination +#endif // finish Apple case + #include <cstring> #include <cerrno> #include <limits>