Fix:
tkoption.c:875:9: error: implicit declaration of function 'read' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    if (read(fileId, buffer, (int) statBuf.st_size) != statBuf.st_size) {
        ^
--- src/tk/tkconfig.h.orig	2018-06-29 04:19:31.000000000 -0500
+++ src/tk/tkconfig.h	2022-05-16 20:05:25.000000000 -0500
@@ -45,6 +45,7 @@
 #include <sys/file.h>
 #include <sys/stat.h>
 #include <sys/time.h>
+#include <unistd.h>
 #ifndef _TCL
 #   include <tcl.h>
 #endif
