diff options
author | Victor Stinner <vstinner@python.org> | 2024-07-01 08:49:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-01 08:49:33 (GMT) |
commit | a0b8b342c5d0b4722ad9cfe82f2630025d445f00 (patch) | |
tree | 648a489546168c93d4d31728120e2340bfa6e363 | |
parent | af8c3d7a26d605099f5b3406a8d33ecddb77e8fb (diff) | |
download | cpython-a0b8b342c5d0b4722ad9cfe82f2630025d445f00.zip cpython-a0b8b342c5d0b4722ad9cfe82f2630025d445f00.tar.gz cpython-a0b8b342c5d0b4722ad9cfe82f2630025d445f00.tar.bz2 |
gh-121199: Use _Py__has_attribute() in timemodule.c (#121203)
Use the _Py__has_attribute() macro in timemodule.c and
bootstrap_hash.c to fix a build error on old GCC versions (GCC 4.8.5
on s390x).
-rw-r--r-- | Modules/timemodule.c | 2 | ||||
-rw-r--r-- | Python/bootstrap_hash.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c index ed2d326..4b10730 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 92f2301..1dc5bff 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))) |