diff --git a/src/demoreader.cpp b/src/demoreader.cpp
--- a/src/demoreader.cpp
+++ b/src/demoreader.cpp
@@ -17,6 +17,8 @@
   along with serialplot.  If not, see .
 */
 
+#include 
+
 #include "demoreader.h"
 
 #ifndef M_PI
diff --git a/src/plot.cpp b/src/plot.cpp
--- a/src/plot.cpp
+++ b/src/plot.cpp
@@ -21,6 +21,8 @@
 #include 
 #include 
 
+#include 
+
 #include "plot.h"
 #include "utils.h"
 
diff --git a/src/plotcontrolpanel.cpp b/src/plotcontrolpanel.cpp
--- a/src/plotcontrolpanel.cpp
+++ b/src/plotcontrolpanel.cpp
@@ -17,10 +17,13 @@
   along with serialplot.  If not, see .
 */
 
+#include 
+
+#include 
+
 #include "plotcontrolpanel.h"
 #include "ui_plotcontrolpanel.h"
 
-#include 
 
 /// Used for scale range selection combobox
 struct Range