--- a/src/libtracker-miners-common/tracker-landlock.c
+++ b/src/libtracker-miners-common/tracker-landlock.c
@@ -28,6 +28,7 @@
 #include <linux/landlock.h>
 #include <sys/prctl.h>
 #include <sys/syscall.h>
+#include <unistd.h>
 
 #include "tracker-debug.h"
 
