diff --git a/src/db/update/ExcludeList.cxx b/src/db/update/ExcludeList.cxx
index 390b9e36d..69f5d8244 100644
--- a/src/db/update/ExcludeList.cxx
+++ b/src/db/update/ExcludeList.cxx
@@ -35,6 +35,8 @@
 #include <assert.h>
 #include <string.h>
 
+#ifdef HAVE_CLASS_GLOB
+
 inline void
 ExcludeList::ParseLine(char *line) noexcept
 {
@@ -43,6 +45,8 @@ ExcludeList::ParseLine(char *line) noexcept
 		patterns.emplace_front(p);
 }
 
+#endif
+
 bool
 ExcludeList::Load(InputStreamPtr is)
 {