Browse Source

[build] fix build on MacOS X Tiger

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

x-ref:
  https://trac.macports.org/ticket/58550
  https://github.com/macports/macports-ports/pull/4760
personal/stbuehler/ci-build
Glenn Strauss 2 years ago
parent
commit
bc89b98acb
  1. 6
      src/base.h
  2. 4
      src/mod_webdav.c

6
src/base.h

@ -5,6 +5,12 @@
#include <sys/types.h>
#include <sys/time.h>
#if defined(__APPLE__) && defined(__MACH__)
#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050
#include <time.h>
#endif
#endif
#include "base_decls.h"
#include "buffer.h"
#include "array.h"

4
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 <copyfile.h> /* fcopyfile() *//* OS X 10.5+ */
#endif
#endif
#ifdef HAVE_ELFTC_COPYFILE/* __FreeBSD__ */
#include <libelftc.h> /* 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))

Loading…
Cancel
Save