diff --git a/common/mptUUID.h b/common/mptUUID.h
index a683fdcab..be7d4cb61 100644
--- a/common/mptUUID.h
+++ b/common/mptUUID.h
@@ -13,6 +13,8 @@
 
 #include "Endianness.h"
 
+#include <stdexcept>
+
 #if MPT_OS_WINDOWS
 #if defined(MODPLUG_TRACKER) || !defined(NO_DMO)
 #include <guiddef.h>