X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/932f65c37388220298b44c65e601c593e4e40b9e..10bdf01b715dcc994f3fe32a6881d5e0b2613a6c:/components/datetime.c

diff --git a/components/datetime.c b/components/datetime.c
index 6dc9678..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,7 +11,7 @@ datetime(const char *fmt)
 
 	t = time(NULL);
 	if (!strftime(buf, sizeof(buf), fmt, localtime(&t))) {
-		fprintf(stderr, "strftime: Result string exceeds buffer size\n");
+		warn("strftime: Result string exceeds buffer size");
 		return NULL;
 	}