fix: avoid mpv cplugin symbols in native addon build

This commit is contained in:
4gray committed 2026-06-10 21:39:12 +02:00
1 parent fc336fa8f5
commit 376100eef7
2 files changed
+3 -8

No files matched your search

@@ -4,13 +4,9 @@
#include <napi.h>
#ifdef IPTVNATOR_DYNAMIC_LIBMPV
#define MPV_CPLUGIN_DYNAMIC_SYM
#endif
#include <mpv/client.h>
#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;
@@ -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)'
);