--- a/src/application/externalchangemonitor.cpp
+++ b/src/application/externalchangemonitor.cpp
@@ -27,6 +27,8 @@
 #include <inotifytools/inotifytools.h>
 #include <inotifytools/inotify.h>
 
+#include <unistd.h>
+
 /**
  * @todo uniform most of the getenv("home") calls so that it is done once
  * and pasted around.
--- a/src/domain/animation/scene.cpp
+++ b/src/domain/animation/scene.cpp
@@ -20,6 +20,7 @@
 #include "scene.h"
 #include <sstream>
 #include <cstring>
+#include <unistd.h>
 
 Scene::Scene()
 {
--- a/src/presentation/frontends/qtfrontend/mainwindowgui.cpp
+++ b/src/presentation/frontends/qtfrontend/mainwindowgui.cpp
@@ -45,6 +45,7 @@
 
 #include <cstdlib>
 #include <iostream>
+#include <unistd.h>
 
 using namespace std;
 using namespace Qt;
--- a/src/technical/projectserializer.cpp
+++ b/src/technical/projectserializer.cpp
@@ -28,6 +28,7 @@
 #include <libgen.h>
 #include <stdlib.h>
 #include <cstring>
+#include <unistd.h>
 
 const char ProjectSerializer::imageDirectory[] = "images/";
 const char ProjectSerializer::soundDirectory[] = "sounds/";
