foo.c: In function ‘main’:
foo.c:35:15: warning: implicit declaration of function ‘strcspn’ [-Wimplicit-function-declaration]
35 | datetime1[strcspn(datetime1, "\n")] = '\0';
| ^~~~~~~
foo.c:3:1: note: include ‘<string.h>’ or provide a declaration of ‘strcspn’
2 | #include <time.h>
+++ |+#include <string.h>
3 |
foo.c:35:15: warning: incompatible implicit declaration of built-in function ‘strcspn’ [-Wbuiltin-declaration-mismatch]
35 | datetime1[strcspn(datetime1, "\n")] = '\0';
| ^~~~~~~
foo.c:35:15: note: include ‘<string.h>’ or provide a declaration of ‘strcspn’