diff --git a/src/util/container.h b/src/util/container.h
index 9a52778d4..a6e302e2c 100644
--- a/src/util/container.h
+++ b/src/util/container.h
@@ -20,6 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #pragma once
 
 #include "irrlichttypes.h"
+#include "debug.h" // sanity_check
 #include "exceptions.h"
 #include "threading/mutex_auto_lock.h"
 #include "threading/semaphore.h"