diff --git a/src/libstore/store.hh b/src/libstore/store.hh
index bcaea401e260e93c917ce1e9f7b3e2f213b57e26..bcf11ce963183ad168b10274d8f855849a6f617a 100644
--- a/src/libstore/store.hh
+++ b/src/libstore/store.hh
@@ -28,7 +28,7 @@ struct Substitute
        is the store path to be substituted). */
     Strings args;
 
-    bool operator == (const Substitute & sub);
+    bool operator == (const Substitute & sub) const;
 };
 
 typedef list<Substitute> Substitutes;