diff --git a/src/libnptm/file_io.cpp b/src/libnptm/file_io.cpp
index 46fe465976ef3c131d285b2a6beb516c661e952b..00afb19918befda10d592e2899ed2323a27a3811 100644
--- a/src/libnptm/file_io.cpp
+++ b/src/libnptm/file_io.cpp
@@ -5,6 +5,7 @@
 #include <exception>
 #include <fstream>
 #include <regex>
+#include <cstring>
 #include <string>
 #include <hdf5.h>