blob: b2a2ebdae36d665f0767a8234ad4c640f13c7e89 [file] [log] [blame]
Andrew Geissler87f5cff2022-09-30 13:13:31 -05001From 6c8fe883df993b9e7987c8f1c849962f8007a373 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 29 Aug 2022 12:50:37 -0700
4Subject: [PATCH] ez-ipupdate: Include time.h for time() API prototype
5
6Fix printf format specifiers for snprintf
7
8Upstream-Status: Pending
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 ez-ipupdate.c | 6 ++++--
12 1 file changed, 4 insertions(+), 2 deletions(-)
13
14diff --git a/ez-ipupdate.c b/ez-ipupdate.c
15index 15a4c13..5cbe7f3 100644
16--- a/ez-ipupdate.c
17+++ b/ez-ipupdate.c
18@@ -38,6 +38,8 @@
19 # include <config.h>
20 #endif
21
22+#include <time.h>
23+
24 // you man very well need to edit this, don't worry though, email is only sent
25 // if bad things happend and it has to exit when in daemon mode.
26 #define SEND_EMAIL_CMD "mail"
27@@ -2483,7 +2485,7 @@ int DHS_update_entry(void)
28 p += strlen(p);
29 limit = BUFFER_SIZE - 1 - strlen(buf);
30
31- snprintf(buf, BUFFER_SIZE, "Content-length: %d\015\012", strlen(putbuf));
32+ snprintf(buf, BUFFER_SIZE, "Content-length: %lu\015\012", strlen(putbuf));
33 output(buf);
34 snprintf(buf, BUFFER_SIZE, "\015\012");
35 output(buf);
36@@ -2620,7 +2622,7 @@ int DHS_update_entry(void)
37 p += strlen(p);
38 limit = BUFFER_SIZE - 1 - strlen(buf);
39
40- snprintf(buf, BUFFER_SIZE, "Content-length: %d\015\012", strlen(putbuf));
41+ snprintf(buf, BUFFER_SIZE, "Content-length: %lu\015\012", strlen(putbuf));
42 output(buf);
43 snprintf(buf, BUFFER_SIZE, "\015\012");
44 output(buf);