diff --git a/autoconf/configure.in b/autoconf/configure.in index 3b04066..eb8dae9 100644 --- a/autoconf/configure.in +++ b/autoconf/configure.in @@ -156,7 +156,12 @@ dnl AC_DEFINE(HAVE_CONFIG_H) AC_HEADER_STDC AC_HEADER_STDBOOL -AC_CHECK_FUNCS(memcpy basename snprintf stat64) +AC_CHECK_FUNCS(memcpy basename snprintf) +dnl OSX 11 (apple silicon) lets you link stat64() but fails to compile +dnl so use a compile test for stat64() instead of a link test. +AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() { stat64(); }])], + [AC_DEFINE([HAVE_STAT64], [1], [Is stat64() available])], + []) AC_CHECK_HEADERS(limits.h) if test "$IPC_SUPPORT" = "yes"; then diff --git a/doc/ACKNOWLEDGEMENTS.md b/doc/ACKNOWLEDGEMENTS.md index 776f232..70c8952 100644 --- a/doc/ACKNOWLEDGEMENTS.md +++ b/doc/ACKNOWLEDGEMENTS.md @@ -75,6 +75,6 @@ is acknowledged and greatly appreciated: * [ikasty](https://github.com/ikasty) - added relative filename display to "`--watchfd`" * [Michael Weiß](https://github.com/quitschbo) - corrected behaviour when not attached to a terminal * [christoph-zededa](https://github.com/christoph-zededa) - provided OS X support for "`--watchfd`" - * [Dave Beckett](https://github.com/dajobe)) - added "`@filename`" syntax to "`--size`" + * [Dave Beckett](https://github.com/dajobe)) - added "`@filename`" syntax to "`--size`", and corrected an autoconf problem with stat64 on OS X --- diff --git a/doc/NEWS.md b/doc/NEWS.md index 3acd2db..49f6095 100644 --- a/doc/NEWS.md +++ b/doc/NEWS.md @@ -1,6 +1,7 @@ UNRELEASED * dropped: support for Red Hat Enterprise Linux and its derivatives has been dropped; removed the RPM spec file, and will no longer build binaries * fix: correction to `pv_in_foreground()` to behave as its comment block says it should, when not on a terminal - corrects [GH#19 "No output in Arch Linux initcpio after 1.6.6"](https://github.com/a-j-wood/pv/issues/19), [GH#55 "pv Stopped Working in the Background"](https://github.com/a-j-wood/pv/issues/55) (pull request [#64](https://github.com/a-j-wood/pv/pull/64) supplied by [Michael Weiß](https://github.com/quitschbo)) + * fix: workaround for OS X 11 behaviour in configure script regarding stat64 at compile time (pull request [#57](https://github.com/a-j-wood/pv/pull/57) supplied by [Dave Beckett](https://github.com/dajobe)) * feature: the "`--size`" option now accepts "`@filename`" to use the size of another file (pull request [#57](https://github.com/a-j-wood/pv/pull/57) supplied by [Dave Beckett](https://github.com/dajobe)) * feature: the "`--watchfd`" option is now available on OS X (pull request [#60](https://github.com/a-j-wood/pv/pull/60) supplied by [christoph-zededa](https://github.com/christoph-zededa)) * feature: the "`--watchfd`" option will now show relative filenames, if they are under the current directory (pull request [#66](https://github.com/a-j-wood/pv/pull/66) supplied by [ikasty](https://github.com/ikasty))