diff --git a/postproc/swscale.c b/postproc/swscale.c
index cefff839eb85279b05cbee6a77725ce3063b608e..05f07d0444736d8eebeed158ebce63626424e0ff 100644
--- a/postproc/swscale.c
+++ b/postproc/swscale.c
@@ -53,6 +53,7 @@ untested special converters
 #include <string.h>
 #include <math.h>
 #include <stdio.h>
+#include <unistd.h>
 #include "../config.h"
 #include "../mangle.h"
 #include <assert.h>