diff -Naur a/mtp/types.h b/mtp/types.h
--- a/mtp/types.h	2020-12-29 17:10:28.000000000 +0100
+++ b/mtp/types.h	2023-05-11 10:35:49.854166228 +0200
@@ -27,6 +27,7 @@
 #include <memory>
 #include <mutex>
 #include <exception>
+#include <stdexcept>
 #include <string>
 
 namespace mtp
