From 309b19d942c05572fd2dd03b592b7323e063c0e6 Mon Sep 17 00:00:00 2001 From: barracuda156 Date: Sun, 24 Dec 2023 19:59:23 +0800 Subject: [PATCH] apple_utils.c: should be included for Darwin, not for Cocoa The build needs this file for linking even when Cocoa is disabled. Commit which introduced it mistakenly includes it only for Cocoa: https://github.com/mpv-player/mpv/commit/0463096b3c5a717a7c181801c8df797b046989fc --- meson.build | 6 +++--- wscript_build.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git meson.build meson.build index f9fe4e7263..a8b91061a0 100644 --- meson.build +++ meson.build @@ -385,8 +385,7 @@ cocoa = dependency('appleframeworks', modules: ['Cocoa', 'IOKit', 'QuartzCore'], features += {'cocoa': cocoa.found()} if features['cocoa'] dependencies += cocoa - sources += files('osdep/apple_utils.c', - 'osdep/language-apple.c', + sources += files('osdep/language-apple.c', 'osdep/macosx_application.m', 'osdep/macosx_events.m', 'osdep/macosx_menubar.m', @@ -415,7 +414,8 @@ endif if darwin path_source = files('osdep/path-darwin.c') - sources += path_source + files('osdep/timer-darwin.c') + sources += path_source + files('osdep/apple_utils.c', + 'osdep/timer-darwin.c') endif diff --git wscript_build.py wscript_build.py index a470808ae5..63d83730db 100644 --- wscript_build.py +++ wscript_build.py @@ -606,7 +606,7 @@ def build(ctx): ( language_c ), ( "osdep/android/strnlen.c", "android"), - ( "osdep/apple_utils.c", "cocoa" ), + ( "osdep/apple_utils.c", "os-darwin" ), ( "osdep/glob-win.c", "glob-win32" ), ( "osdep/macosx_application.m", "cocoa" ), ( "osdep/macosx_events.m", "cocoa" ),