diff --git a/include/opendht/dht.h b/include/opendht/dht.h
index 4fb8cbb6a4a51e2276cd65b624f174a2182972ac..5e420f84464ca69d3b04419ad3deea0fc5fb7621 100644
--- a/include/opendht/dht.h
+++ b/include/opendht/dht.h
@@ -74,7 +74,7 @@ public:
     /**
      * Get the ID of the node.
      */
-    inline const InfoHash& getNodeId() const { return myid; }
+    inline const InfoHash& getNodeId() const override { return myid; }
 
     /**
      * Get the current status of the node for the given family.