Skip to content

Commit fd958df

Browse files
committed
lib/upnp/meson.build: refuse to build with libupnp >= 1.14.26 due to API breakage
This avoids MPD build breakages for users which have libupnp with the API-breaking commit pupnp/pupnp@25d4bd0 We once had the conditional `const` loooong ago, but it was removed by commit 736a696 ("drop support for libupnp versions older than 1.8"). I don't want to add another compile-time conditional because I don't understand the API change yet. I'm not even sure anybody even uses MPD with UPnP. Let's see if anybody complains (and re-submits the old pre-1.8 workaround, but I'd prefer if the pupnp project reverts the API breakage instead). See pupnp/pupnp#528
1 parent abed396 commit fd958df

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
ver 0.24.9 (not yet released)
2+
* database
3+
- upnp: refuse to build with libupnp >= 1.14.26 due to API breakage
24

35
ver 0.24.8 (2026/01/26)
46
* input

src/lib/upnp/meson.build

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,23 @@ endif
1212

1313
if upnp_option == 'auto'
1414
upnp_dep = dependency('libupnp', version: '>= 1.8', required: false)
15+
16+
if upnp_dep.found() and upnp_dep.version().version_compare('>= 1.14.26')
17+
warning('Your libupnp version is known to be broken, see https://github.com/pupnp/pupnp/issues/528 - disabling')
18+
upnp_dep = dependency('', required: false)
19+
endif
20+
1521
conf.set('USING_PUPNP', upnp_dep.found())
1622
if not upnp_dep.found()
1723
upnp_dep = dependency('libnpupnp', version: '>= 1.8', required: false)
1824
endif
1925
elif upnp_option == 'pupnp'
2026
upnp_dep = dependency('libupnp', version: '>= 1.8', required: true)
27+
28+
if upnp_dep.found() and upnp_dep.version().version_compare('>= 1.14.26')
29+
error('Your libupnp version is known to be broken, see https://github.com/pupnp/pupnp/issues/528')
30+
endif
31+
2132
conf.set('USING_PUPNP', true)
2233
elif upnp_option == 'npupnp'
2334
upnp_dep = dependency('libnpupnp', required: true)

0 commit comments

Comments
 (0)