diff --git a/src/base.h b/src/base.h index 7c54eba9..dd5a37fe 100644 --- a/src/base.h +++ b/src/base.h @@ -5,6 +5,12 @@ #include #include +#if defined(__APPLE__) && defined(__MACH__) +#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050 +#include +#endif +#endif + #include "base_decls.h" #include "buffer.h" #include "array.h" diff --git a/src/mod_webdav.c b/src/mod_webdav.c index 85828be0..554e20ff 100644 --- a/src/mod_webdav.c +++ b/src/mod_webdav.c @@ -2035,8 +2035,10 @@ webdav_prop_select_propnames (const plugin_config * const pconf, #if defined(__APPLE__) && defined(__MACH__) +#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 #include /* fcopyfile() *//* OS X 10.5+ */ #endif +#endif #ifdef HAVE_ELFTC_COPYFILE/* __FreeBSD__ */ #include /* elftc_copyfile() */ #endif @@ -2068,12 +2070,14 @@ webdav_fcopyfile_sz (int ifd, int ofd, off_t isz) #endif #if defined(__APPLE__) && defined(__MACH__) + #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 if (0 == fcopyfile(ifd, ofd, NULL, COPYFILE_ALL)) return 0; if (0 != lseek(ifd, 0, SEEK_SET)) return -1; if (0 != lseek(ofd, 0, SEEK_SET)) return -1; #endif + #endif #ifdef HAVE_ELFTC_COPYFILE /* __FreeBSD__ */ if (0 == elftc_copyfile(ifd, ofd))