https://github.com/termux/termux-packages/issues/15852

--- a/src/x11/fg_main_x11.c
+++ b/src/x11/fg_main_x11.c
@@ -30,6 +30,7 @@
 #include "../fg_internal.h"
 #include <errno.h>
 #include <stdarg.h>
+#include <time.h>
 
 
 /*
