diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-08-29 12:54:23 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-08-30 00:14:58 -0700 |
commit | 5408788e2b846df6bffbb9e007e2467b8d741f7d (patch) | |
tree | 63e284a56d0ae7a3a059d4de871c192d9a07a93f | |
parent | 8c05c5b088a2842e55d79a2fad67c37a0bae3c41 (diff) | |
download | meta-openembedded-5408788e2b846df6bffbb9e007e2467b8d741f7d.tar.gz |
ez-ipupdate: Fix build with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 50 insertions, 5 deletions
diff --git a/meta-networking/recipes-connectivity/ez-ipupdate/ez-ipupdate_3.0.11b7.bb b/meta-networking/recipes-connectivity/ez-ipupdate/ez-ipupdate_3.0.11b7.bb index 8648f2e0e..42ecf9bac 100644 --- a/meta-networking/recipes-connectivity/ez-ipupdate/ez-ipupdate_3.0.11b7.bb +++ b/meta-networking/recipes-connectivity/ez-ipupdate/ez-ipupdate_3.0.11b7.bb | |||
@@ -5,11 +5,12 @@ LICENSE = "GPL-2.0-only" | |||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=7783169b4be06b54e86730eb01bc3a31" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=7783169b4be06b54e86730eb01bc3a31" |
6 | 6 | ||
7 | SRC_URI = "http://sourceforge.net/projects/ez-ipupdate/files/${BPN}/${PV}/${BPN}-${PV}.tar.gz \ | 7 | SRC_URI = "http://sourceforge.net/projects/ez-ipupdate/files/${BPN}/${PV}/${BPN}-${PV}.tar.gz \ |
8 | file://Makefile.am.patch \ | 8 | file://Makefile.am.patch \ |
9 | file://cache_file.c.patch \ | 9 | file://cache_file.c.patch \ |
10 | file://conf_file.c.patch \ | 10 | file://conf_file.c.patch \ |
11 | file://wformat.patch \ | 11 | file://wformat.patch \ |
12 | " | 12 | file://0001-ez-ipupdate-Include-time.h-for-time-API-prototype.patch \ |
13 | " | ||
13 | SRC_URI[md5sum] = "525be4550b4461fdf105aed8e753b020" | 14 | SRC_URI[md5sum] = "525be4550b4461fdf105aed8e753b020" |
14 | SRC_URI[sha256sum] = "a15ec0dc0b78ec7578360987c68e43a67bc8d3591cbf528a323588830ae22c20" | 15 | SRC_URI[sha256sum] = "a15ec0dc0b78ec7578360987c68e43a67bc8d3591cbf528a323588830ae22c20" |
15 | 16 | ||
diff --git a/meta-networking/recipes-connectivity/ez-ipupdate/files/0001-ez-ipupdate-Include-time.h-for-time-API-prototype.patch b/meta-networking/recipes-connectivity/ez-ipupdate/files/0001-ez-ipupdate-Include-time.h-for-time-API-prototype.patch new file mode 100644 index 000000000..b2a2ebdae --- /dev/null +++ b/meta-networking/recipes-connectivity/ez-ipupdate/files/0001-ez-ipupdate-Include-time.h-for-time-API-prototype.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 6c8fe883df993b9e7987c8f1c849962f8007a373 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 29 Aug 2022 12:50:37 -0700 | ||
4 | Subject: [PATCH] ez-ipupdate: Include time.h for time() API prototype | ||
5 | |||
6 | Fix printf format specifiers for snprintf | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | ez-ipupdate.c | 6 ++++-- | ||
12 | 1 file changed, 4 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/ez-ipupdate.c b/ez-ipupdate.c | ||
15 | index 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); | ||