--- a/service/DeviceManager.h
+++ b/service/DeviceManager.h
@@ -7,6 +7,7 @@
 #ifndef TELLDUS_CORE_SERVICE_DEVICEMANAGER_H_
 #define TELLDUS_CORE_SERVICE_DEVICEMANAGER_H_
 
+#include <ctime>
 #include <set>
 #include <string>
 #include "service/Device.h"
--- a/service/Sensor.h
+++ b/service/Sensor.h
@@ -7,6 +7,7 @@
 #ifndef TELLDUS_CORE_SERVICE_SENSOR_H_
 #define TELLDUS_CORE_SERVICE_SENSOR_H_
 
+#include <ctime>
 #include <string>
 #include "common/Mutex.h"
 
