diff --git a/src/lib/upnp/Compat.hxx b/src/lib/upnp/Compat.hxx
index 19eaee992..b9ef900a1 100644
--- a/src/lib/upnp/Compat.hxx
+++ b/src/lib/upnp/Compat.hxx
@@ -24,6 +24,10 @@
 /* libupnp versions until 1.10.1 redefine "bool" and "true" */
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wkeyword-macro"
+
+/* libupnp 1.8.4 uses a flawed kludge to suppress this warning in
+   inline function __list_add_valid() */
+#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
 #endif
 
 #include <upnp.h>