This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new a81b23a85a avdevice/avfoundation: fix build with deployment targets 
below macOS 12
a81b23a85a is described below

commit a81b23a85aca34f9942dc1a63a521946a6407d3f
Author:     Gabriel Balaich <[email protected]>
AuthorDate: Thu Aug 6 12:21:37 2026 -0600
Commit:     Romain Beauxis <[email protected]>
CommitDate: Fri Aug 7 13:55:36 2026 +0000

    avdevice/avfoundation: fix build with deployment targets below macOS 12
    
    c2802e520a selected kIOMainPortDefault whenever the SDK is new enough
    (__MAC_OS_X_VERSION_MAX_ALLOWED), but that symbol is only available
    since macOS 12, so building with a newer SDK against an older
    deployment target failed with -Wunguarded-availability-new.
    
    Check the deployment target (__MAC_OS_X_VERSION_MIN_REQUIRED) instead
    and keep using the equivalent kIOMasterPortDefault when targeting
    older releases.
    
    See: 
https://lists.ffmpeg.org/archives/list/[email protected]/thread/S7PGVSGNLIZ2WRYV6VOBAD3RWYUNWA3H/
    Reported-by: Helmut K. C. Tessarek <[email protected]>
    Signed-off-by: Gabriel Balaich <[email protected]>
---
 libavdevice/avfoundation.m | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m
index 88b814ecf1..4516388dd4 100644
--- a/libavdevice/avfoundation.m
+++ b/libavdevice/avfoundation.m
@@ -30,8 +30,9 @@
 #import <AVFoundation/AVFoundation.h>
 #if HAVE_IOKIT
 #   import <IOKit/IOKitLib.h>
-    /* kIOMainPortDefault replaced kIOMasterPortDefault in the macOS 12 SDK. */
-#   if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && 
__MAC_OS_X_VERSION_MAX_ALLOWED >= 120000
+    /* kIOMainPortDefault is only available since macOS 12; fall back to the
+     * equivalent kIOMasterPortDefault when targeting older releases. */
+#   if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && 
__MAC_OS_X_VERSION_MIN_REQUIRED >= 120000
 #       define AVF_IO_MAIN_PORT_DEFAULT kIOMainPortDefault
 #   else
 #       define AVF_IO_MAIN_PORT_DEFAULT kIOMasterPortDefault

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to