X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/ee5ec756218c852385c5ba5ef0f75b47ba59ec39..c59b64e643386f42f4329d77d25070be264245da:/components/datetime.c

diff --git a/components/datetime.c b/components/datetime.c
index 713b0fb..c3efae3 100644
--- a/components/datetime.c
+++ b/components/datetime.c
@@ -1,4 +1,5 @@
 /* See LICENSE file for copyright and license details. */
+#include <stdio.h>
 #include <time.h>
 
 #include "../util.h"
@@ -10,6 +11,7 @@ datetime(const char *fmt)
 
 	t = time(NULL);
 	if (!strftime(buf, sizeof(buf), fmt, localtime(&t))) {
+		warn("strftime: Result string exceeds buffer size");
 		return NULL;
 	}