diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c
index 49bc0801f02f..24089cc28645 100644
--- a/usr.bin/fstat/fstat.c
+++ b/usr.bin/fstat/fstat.c
@@ -46,6 +46,7 @@ static const char rcsid[] =
 #endif /* not lint */
 
 #include <sys/param.h>
+#include <sys/lock.h>
 #include <sys/time.h>
 #include <sys/proc.h>
 #include <sys/user.h>
diff --git a/usr.bin/gcore/aoutcore.c b/usr.bin/gcore/aoutcore.c
index 7757230e14cf..b5f6143730f0 100644
--- a/usr.bin/gcore/aoutcore.c
+++ b/usr.bin/gcore/aoutcore.c
@@ -57,6 +57,7 @@ static const char rcsid[] =
  * contract BG 91-66 and contributed to Berkeley.
  */
 #include <sys/param.h>
+#include <sys/lock.h>
 #include <sys/time.h>
 #include <sys/stat.h>
 #include <sys/proc.h>
diff --git a/usr.bin/gcore/gcore.c b/usr.bin/gcore/gcore.c
index 7757230e14cf..b5f6143730f0 100644
--- a/usr.bin/gcore/gcore.c
+++ b/usr.bin/gcore/gcore.c
@@ -57,6 +57,7 @@ static const char rcsid[] =
  * contract BG 91-66 and contributed to Berkeley.
  */
 #include <sys/param.h>
+#include <sys/lock.h>
 #include <sys/time.h>
 #include <sys/stat.h>
 #include <sys/proc.h>
diff --git a/usr.bin/killall/killall.c b/usr.bin/killall/killall.c
index ea3d01c6607a..359af0470813 100644
--- a/usr.bin/killall/killall.c
+++ b/usr.bin/killall/killall.c
@@ -29,6 +29,7 @@
 
 #include <sys/cdefs.h>
 #include <sys/param.h>
+#include <sys/lock.h>
 #include <sys/stat.h>
 #include <sys/user.h>
 #include <sys/sysctl.h>
diff --git a/usr.bin/ktrace/subr.c b/usr.bin/ktrace/subr.c
index 4e4b3bf466a5..a66bbcf1564d 100644
--- a/usr.bin/ktrace/subr.c
+++ b/usr.bin/ktrace/subr.c
@@ -41,6 +41,7 @@ static const char rcsid[] =
 
 #include <sys/param.h>
 #include <sys/file.h>
+#include <sys/lock.h>
 #include <sys/user.h>
 #include <sys/proc.h>
 #include <sys/time.h>
diff --git a/usr.bin/systat/pigs.c b/usr.bin/systat/pigs.c
index 03a9e94513fd..62a603ad16ab 100644
--- a/usr.bin/systat/pigs.c
+++ b/usr.bin/systat/pigs.c
@@ -43,6 +43,7 @@ static char sccsid[] = "@(#)pigs.c	8.2 (Berkeley) 9/23/93";
 
 #include <sys/param.h>
 #include <sys/dkstat.h>
+#include <sys/lock.h>
 #include <sys/time.h>
 #include <sys/user.h>
 #include <sys/sysctl.h>
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c
index 96bc79d8d0cd..1c3d152c1475 100644
--- a/usr.bin/top/machine.c
+++ b/usr.bin/top/machine.c
@@ -28,6 +28,7 @@
 #include <sys/types.h>
 #include <sys/signal.h>
 #include <sys/param.h>
+#include <sys/lock.h>
 
 #include "os.h"
 #include <stdio.h>
diff --git a/usr.bin/w/proc_compare.c b/usr.bin/w/proc_compare.c
index 6517dee66676..a9403e77f78b 100644
--- a/usr.bin/w/proc_compare.c
+++ b/usr.bin/w/proc_compare.c
@@ -40,6 +40,7 @@ static const char rcsid[] =
 #endif /* not lint */
 
 #include <sys/param.h>
+#include <sys/lock.h>
 #include <sys/time.h>
 #include <sys/user.h>
 
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c
index 4126bcacaa09..6ef6ad9164c0 100644
--- a/usr.bin/w/w.c
+++ b/usr.bin/w/w.c
@@ -52,6 +52,7 @@ static const char rcsid[] =
  *
  */
 #include <sys/param.h>
+#include <sys/lock.h>
 #include <sys/time.h>
 #include <sys/stat.h>
 #include <sys/sysctl.h>