--- x264-19856cc41ad11e434549fb3cc6a019e645ce1efe/common/cpu.c.orig	Thu Jan 20 11:18:26 2022
+++ x264-19856cc41ad11e434549fb3cc6a019e645ce1efe/common/cpu.c	Thu Jan 20 11:18:52 2022
@@ -42,6 +42,9 @@
 #include <sys/sysctl.h>
 #include <machine/cpu.h>
 #endif
+#if SYS_SunOS
+#include <unistd.h>
+#endif
 
 const x264_cpu_name_t x264_cpu_names[] =
 {