diff --git a/recipes-extended/diod/diod_1.0.24.bb b/recipes-extended/diod/diod_1.0.24.bb index d555e5c0..89e79df9 100644 --- a/recipes-extended/diod/diod_1.0.24.bb +++ b/recipes-extended/diod/diod_1.0.24.bb @@ -9,16 +9,17 @@ LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" PV = "1.0.24+git" -SRCREV = "b4b5e8e00ed11b21d7fcf05a080dc054a8eac2d6" +SRCREV = "54d1325fc435d14a6f5c161c88dac79b016b0061" SRC_URI = "git://github.com/chaos/diod.git;protocol=https;branch=master \ file://diod \ file://diod.conf \ file://0001-build-Find-lua-with-pkg-config.patch \ - file://0002-Handle-various-time_t-sizes-in-printf-and-scanf.patch \ " DEPENDS = "libcap ncurses tcp-wrappers lua" EXTRA_OEMAKE += "systemddir=${systemd_unitdir}/system" +EXTRA_OECONF = "--disable-auth \ + --with-systemdsystemunitdir=${systemd_unitdir}/system" S = "${WORKDIR}/git" diff --git a/recipes-extended/diod/files/0002-Handle-various-time_t-sizes-in-printf-and-scanf.patch b/recipes-extended/diod/files/0002-Handle-various-time_t-sizes-in-printf-and-scanf.patch deleted file mode 100644 index 3c13c101..00000000 --- a/recipes-extended/diod/files/0002-Handle-various-time_t-sizes-in-printf-and-scanf.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 04b0c5a5cb9e32090b177ff7327ad3260783abe0 Mon Sep 17 00:00:00 2001 -From: Ola x Nilsson -Date: Mon, 15 Apr 2024 17:31:44 +0200 -Subject: [PATCH] Handle various time_t sizes in printf and scanf - -The members of the timeval struct are both signed (defined by POSIX) -and typically both 64 bits on a system where time_t is 64 bits. This -is possible also on 32 bit systems where time_t is larger to handle -the 2038 problem. - -It's practically impossible to find a type and printf format that -works even on all glibc systems. Play it safe and always use printf -with intmax_t and explict int64_t variables for scanf. - -Upstream-Status: Submitted [https://github.com/chaos/diod/pull/100] -Signed-off-by: Ola x Nilsson ---- - libnpfs/conn.c | 5 +++-- - libnpfs/ctl.c | 7 ++++--- - utils/dioddate.c | 8 +++++++- - 3 files changed, 14 insertions(+), 6 deletions(-) - -diff --git a/libnpfs/conn.c b/libnpfs/conn.c -index 6e85fff..c34c840 100644 ---- a/libnpfs/conn.c -+++ b/libnpfs/conn.c -@@ -16,6 +16,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -133,8 +134,8 @@ _debug_trace (Npsrv *srv, Npfcall *fc) - (void)gettimeofday(&b, NULL); - (void)gettimeofday(&a, NULL); - timersub(&a, &b, &c); -- np_logmsg(srv, "[%lu.%-3lu] %s", -- c.tv_sec, c.tv_usec/1000, s); -+ np_logmsg(srv, "[%"PRIdMAX".%-3"PRIdMAX"] %s", -+ (intmax_t)c.tv_sec, (intmax_t)c.tv_usec/1000, s); - } else - np_logmsg(srv, "%s", s); - } -diff --git a/libnpfs/ctl.c b/libnpfs/ctl.c -index f40cde4..317a22e 100644 ---- a/libnpfs/ctl.c -+++ b/libnpfs/ctl.c -@@ -16,6 +16,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -291,9 +292,9 @@ _ctl_get_date (char *name, void *a) - np_uerror (errno); - goto error; - } -- if (aspf (&s, &len, "%lu.%lu %d.%d\n", -- tv.tv_sec, tv.tv_usec, -- tz.tz_minuteswest, tz.tz_dsttime) < 0) { -+ if (aspf (&s, &len, "%"PRIdMAX".%"PRIdMAX" %d.%d\n", -+ (uintmax_t)tv.tv_sec, (uintmax_t)tv.tv_usec, -+ tz.tz_minuteswest, tz.tz_dsttime) < 0) { - np_uerror (ENOMEM); - goto error; - } -diff --git a/utils/dioddate.c b/utils/dioddate.c -index bde002f..f392792 100644 ---- a/utils/dioddate.c -+++ b/utils/dioddate.c -@@ -21,6 +21,7 @@ - #include - #include - #include -+#include - #include - #include - #if HAVE_GETOPT_H -@@ -142,11 +143,16 @@ main (int argc, char *argv[]) - errn (np_rerror (), "error reading date"); - goto done; - } -- if (sscanf (buf, "%lu.%lu %d.%d", &tv.tv_sec, &tv.tv_usec, -+ -+ int64_t sec = 0, usec = 0; -+ if (sscanf (buf, "%"SCNd64".%"SCNd64" %d.%d", &sec, &usec, - &tz.tz_minuteswest, &tz.tz_dsttime) != 4) { - msg ("error scanning returned date: %s", buf); - goto done; - } -+ tv.tv_sec = sec; -+ tv.tv_usec = usec; -+ - if (Sopt) { - if (settimeofday (&tv, &tz) < 0) - err_exit ("settimeofday");