On Wed, Feb 16, 2022 at 2:01 AM Philippe Mathieu-Daudé <f4...@amsat.org> wrote: > > When building with GCC on macOS Catalina we get 2254 times: > > include/qemu/osdep.h:780:5: warning: 'pthread_jit_write_protect_np' is only > available on macOS 11.0 or newer [-Wunguarded-availability-new] > pthread_jit_write_protect_np(true); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Fix by using a stricker toolchain version low range, replacing > MAC_OS_X_VERSION_MAX_ALLOWED by MAC_OS_X_VERSION_MIN_REQUIRED. > > Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> > --- > include/qemu/osdep.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h > index aecd2f66ec..1e7a002339 100644 > --- a/include/qemu/osdep.h > +++ b/include/qemu/osdep.h > @@ -774,7 +774,7 @@ size_t qemu_get_host_physmem(void); > * for the current thread. > */ > #if defined(MAC_OS_VERSION_11_0) && \ > - MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_11_0 > + MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_11_0 > static inline void qemu_thread_jit_execute(void) > { > pthread_jit_write_protect_np(true); > -- > 2.34.1 >
This should be squashed with "[PATCH v2 1/8] osdep: Avoid using Clang-specific __builtin_available()"; Removing __builtin_available makes it incompatible with macOS < 11.0, hence this change is needed.