#49235: policykit 0.113 cannot be built on PPC Tiger, Mac OS X 10.4.11, because Availability.h not found ------------------------------+---------------------------- Reporter: Peter_Dyballa@… | Owner: devans@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: tiger haspatch Port: policykit | ------------------------------+---------------------------- Changes (by devans@…): * status: new => assigned * version: 2.3.4 => Comment: Replying to [ticket:49235 Peter_Dyballa@…]:
This can be avoided by adding another guard:
{{{ +#ifdef __APPLE__ +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 || __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 +#include <Availability.h> +#endif +#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060 }}}
Yes, thanks for reminding me of this issue. But, after looking things over to refresh my memory, I would suggest a slightly different modification as follows: {{{ +#ifdef __APPLE__ +#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 +#include <Availability.h> +#else +#include <AvailabilityMacros.h> +#endif +#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060 }}} The rationale is that __MAC_OS_X_VERSION_MIN_REQUIRED is defined in Availability.h, so using the built-in compiler preprocessor definition __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ is probably the only part that works. AvailabilityMacros.h serves the same purpose as Availability.h on the older OS versions and should be available back to 10.2 if I remember correctly. Can you test this modification and see if it works? I'm thinking there are probably some other issues with this port on your platform as well. The pam configuration for instance. Is #45832 still an issue with 0.113? Also #45921. -- Ticket URL: <https://trac.macports.org/ticket/49235#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X