See: https://trac.macports.org/ticket/58550 fixes for Tiger build, but can be applied generally to all builds also requires legacysupport PortGroup for *at functions kencu@macports.org diff --git src/base.h src/base.h index f21973b..224d4f8 100644 --- src/base.h +++ src/base.h @@ -7,6 +7,10 @@ #include #include +#if defined(__APPLE__) && defined(__MACH__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050) +#include +#endif + #include "base_decls.h" #include "buffer.h" #include "array.h" diff --git src/mod_webdav.c src/mod_webdav.c index 121e403..c0eb7d5 100644 --- src/mod_webdav.c +++ src/mod_webdav.c @@ -2012,7 +2012,7 @@ webdav_prop_select_propnames (const plugin_config * const pconf, } -#if defined(__APPLE__) && defined(__MACH__) +#if defined(__APPLE__) && defined(__MACH__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050) #include /* fcopyfile() *//* OS X 10.5+ */ #endif #ifdef HAVE_ELFTC_COPYFILE/* __FreeBSD__ */ @@ -2045,7 +2045,7 @@ webdav_fcopyfile_sz (int ifd, int ofd, off_t isz) /*fcntl(ofd, F_SETFL, fcntl(ofd, F_GETFL, 0) & ~O_NONBLOCK);*/ #endif - #if defined(__APPLE__) && defined(__MACH__) + #if defined(__APPLE__) && defined(__MACH__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050) if (0 == fcopyfile(ifd, ofd, NULL, COPYFILE_ALL)) return 0;