From 376100eef769950f9ae35ab437a20fe5b5d883eb Mon Sep 17 00:00:00 2001 From: 4gray <4gray@users.noreply.github.com> Date: Wed, 10 Jun 2026 21:39:12 +0200 Subject: [PATCH] fix: avoid mpv cplugin symbols in native addon build --- apps/electron-backend/native/src/embedded_mpv_wid_common.h | 6 +----- .../src/app/services/embedded-mpv-native-source.spec.ts | 5 ++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/apps/electron-backend/native/src/embedded_mpv_wid_common.h b/apps/electron-backend/native/src/embedded_mpv_wid_common.h index a19f14221..a0a0486b1 100644 --- a/apps/electron-backend/native/src/embedded_mpv_wid_common.h +++ b/apps/electron-backend/native/src/embedded_mpv_wid_common.h @@ -4,13 +4,9 @@ #include -#ifdef IPTVNATOR_DYNAMIC_LIBMPV -#define MPV_CPLUGIN_DYNAMIC_SYM -#endif - #include -#if defined(IPTVNATOR_DYNAMIC_LIBMPV) && !defined(mpv_command_async) +#ifdef IPTVNATOR_DYNAMIC_LIBMPV #define IPTVNATOR_DECLARE_MPV_DYNAMIC_SYMBOL(name) \ MPV_SELECTANY decltype(&name) pfn_##name = nullptr; diff --git a/apps/electron-backend/src/app/services/embedded-mpv-native-source.spec.ts b/apps/electron-backend/src/app/services/embedded-mpv-native-source.spec.ts index 7a337e9f6..78c8ca1e3 100644 --- a/apps/electron-backend/src/app/services/embedded-mpv-native-source.spec.ts +++ b/apps/electron-backend/src/app/services/embedded-mpv-native-source.spec.ts @@ -208,9 +208,8 @@ describe('Embedded MPV native source recording invariants', () => { }); it('keeps dynamic libmpv symbol declarations compatible with distro headers', () => { - expect(widCommonSource).toContain( - '#if defined(IPTVNATOR_DYNAMIC_LIBMPV) && !defined(mpv_command_async)' - ); + expect(widCommonSource).not.toContain('MPV_CPLUGIN_DYNAMIC_SYM'); + expect(widCommonSource).toContain('#ifdef IPTVNATOR_DYNAMIC_LIBMPV'); expect(widCommonSource).toContain( 'IPTVNATOR_DECLARE_MPV_DYNAMIC_SYMBOL(mpv_command_async)' );