diff --git a/debug/tst-longjmp_chk3.c b/debug/tst-longjmp_chk3.c
index 7bf1646b35..9b9db3b9e9 100644
--- a/debug/tst-longjmp_chk3.c
+++ b/debug/tst-longjmp_chk3.c
@@ -20,6 +20,7 @@
 #include <signal.h>
 #include <stdio.h>
 #include <string.h>
+#include <unistd.h>
 
 #include <support/support.h>