[PATCH] osdep.h: Clean up no-longer-needed back-compat for macOS 10

Peter Maydell posted 1 patch 3 months, 3 weeks ago
include/qemu/osdep.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
[PATCH] osdep.h: Clean up no-longer-needed back-compat for macOS 10
Posted by Peter Maydell 3 months, 3 weeks ago
Our official support policy only supports the most recent two
versions of macOS (currently macOS 13 Ventura and macOS 14 Sonoma),
and we already have code that assumes at least macOS 12 Monterey or
better.  In commit 2d27c91e2b72ac7 we dropped some of the back-compat
code for older macOS versions, but missed the guard in osdep.h that
is providing a fallback for macOS 10 and earlier.

Simplify the ifdef to the "ifdef __APPLE__" that we use elsewhere for
"is this macOS?".

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 include/qemu/osdep.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 191916f38e6..720ed21a7e4 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -786,8 +786,7 @@ size_t qemu_get_host_physmem(void);
  * Toggle write/execute on the pages marked MAP_JIT
  * for the current thread.
  */
-#if defined(MAC_OS_VERSION_11_0) && \
-    MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_11_0
+#ifdef __APPLE__
 static inline void qemu_thread_jit_execute(void)
 {
     pthread_jit_write_protect_np(true);
-- 
2.34.1
Re: [PATCH] osdep.h: Clean up no-longer-needed back-compat for macOS 10
Posted by Philippe Mathieu-Daudé 3 months, 3 weeks ago
On 30/7/24 11:59, Peter Maydell wrote:
> Our official support policy only supports the most recent two
> versions of macOS (currently macOS 13 Ventura and macOS 14 Sonoma),
> and we already have code that assumes at least macOS 12 Monterey or
> better.  In commit 2d27c91e2b72ac7 we dropped some of the back-compat
> code for older macOS versions, but missed the guard in osdep.h that
> is providing a fallback for macOS 10 and earlier.
> 
> Simplify the ifdef to the "ifdef __APPLE__" that we use elsewhere for
> "is this macOS?".
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   include/qemu/osdep.h | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

and queued, thanks.


Re: [PATCH] osdep.h: Clean up no-longer-needed back-compat for macOS 10
Posted by Daniel P. Berrangé 3 months, 3 weeks ago
On Tue, Jul 30, 2024 at 10:59:39AM +0100, Peter Maydell wrote:
> Our official support policy only supports the most recent two
> versions of macOS (currently macOS 13 Ventura and macOS 14 Sonoma),
> and we already have code that assumes at least macOS 12 Monterey or
> better.  In commit 2d27c91e2b72ac7 we dropped some of the back-compat
> code for older macOS versions, but missed the guard in osdep.h that
> is providing a fallback for macOS 10 and earlier.
> 
> Simplify the ifdef to the "ifdef __APPLE__" that we use elsewhere for
> "is this macOS?".
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  include/qemu/osdep.h | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|