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
diff --git src/base.h src/base.h
index f21973b..224d4f8 100644
+#if defined(__APPLE__) && defined(__MACH__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050)
diff --git src/mod_webdav.c src/mod_webdav.c
index 121e403..c0eb7d5 100644
@@ -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 <copyfile.h> /* fcopyfile() *//* OS X 10.5+ */
#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);*/
- #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))