diff --git a/Modules/timemodule.c b/Modules/timemodule.c index ed2d32688ecea5..4b10730436c1aa 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -1488,7 +1488,7 @@ _PyTime_GetThreadTimeWithInfo(PyTime_t *tp, _Py_clock_info_t *info) !defined(__EMSCRIPTEN__) && !defined(__wasi__) #define HAVE_THREAD_TIME -#if defined(__APPLE__) && defined(__has_attribute) && __has_attribute(availability) +#if defined(__APPLE__) && _Py__has_attribute(availability) static int _PyTime_GetThreadTimeWithInfo(PyTime_t *tp, _Py_clock_info_t *info) __attribute__((availability(macos, introduced=10.12))) diff --git a/Python/bootstrap_hash.c b/Python/bootstrap_hash.c index 92f2301a012c0a..1dc5bffe1b0003 100644 --- a/Python/bootstrap_hash.c +++ b/Python/bootstrap_hash.c @@ -199,7 +199,7 @@ py_getrandom(void *buffer, Py_ssize_t size, int blocking, int raise) getentropy() is retried if it failed with EINTR: interrupted by a signal. */ -#if defined(__APPLE__) && defined(__has_attribute) && __has_attribute(availability) +#if defined(__APPLE__) && _Py__has_attribute(availability) static int py_getentropy(char *buffer, Py_ssize_t size, int raise) __attribute__((availability(macos,introduced=10.12)))