Adding upstream patches fixing (u)int64_t on 32-bit machines (Closes: #1023280)
This commit is contained in:
parent
556dc0f0fc
commit
5a11a70409
81
debian/patches/14_PRId64_PRIu64_1
vendored
Normal file
81
debian/patches/14_PRId64_PRIu64_1
vendored
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
From 817ac2e5dad1ce5d0e0ea96fa7f726566251b08d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andreas Baumann <202930+andreasbaumann@users.noreply.github.com>
|
||||||
|
Date: Fri, 21 Oct 2022 18:31:12 +0200
|
||||||
|
Subject: [PATCH] using PRId64 and PRIu64 instead of %ld directly (#1800)
|
||||||
|
|
||||||
|
---
|
||||||
|
plugins/utils.c | 24 ++++++++++++------------
|
||||||
|
1 file changed, 12 insertions(+), 12 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/utils.c b/plugins/utils.c
|
||||||
|
index 17dd58146..f75cf03b7 100644
|
||||||
|
--- a/plugins/utils.c
|
||||||
|
+++ b/plugins/utils.c
|
||||||
|
@@ -615,27 +615,27 @@ char *perfdata_uint64 (const char *label,
|
||||||
|
char *data = NULL;
|
||||||
|
|
||||||
|
if (strpbrk (label, "'= "))
|
||||||
|
- xasprintf (&data, "'%s'=%ld%s;", label, val, uom);
|
||||||
|
+ xasprintf (&data, "'%s'=%" PRId64 "%s;", label, val, uom);
|
||||||
|
else
|
||||||
|
- xasprintf (&data, "%s=%ld%s;", label, val, uom);
|
||||||
|
+ xasprintf (&data, "%s=%" PRId64 "%s;", label, val, uom);
|
||||||
|
|
||||||
|
if (warnp)
|
||||||
|
- xasprintf (&data, "%s%lu;", data, warn);
|
||||||
|
+ xasprintf (&data, "%s%" PRIu64 ";", data, warn);
|
||||||
|
else
|
||||||
|
xasprintf (&data, "%s;", data);
|
||||||
|
|
||||||
|
if (critp)
|
||||||
|
- xasprintf (&data, "%s%lu;", data, crit);
|
||||||
|
+ xasprintf (&data, "%s%" PRIu64 ";", data, crit);
|
||||||
|
else
|
||||||
|
xasprintf (&data, "%s;", data);
|
||||||
|
|
||||||
|
if (minp)
|
||||||
|
- xasprintf (&data, "%s%lu;", data, minv);
|
||||||
|
+ xasprintf (&data, "%s%" PRIu64 ";", data, minv);
|
||||||
|
else
|
||||||
|
xasprintf (&data, "%s;", data);
|
||||||
|
|
||||||
|
if (maxp)
|
||||||
|
- xasprintf (&data, "%s%lu", data, maxv);
|
||||||
|
+ xasprintf (&data, "%s%" PRIu64, data, maxv);
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
@@ -656,27 +656,27 @@ char *perfdata_int64 (const char *label,
|
||||||
|
char *data = NULL;
|
||||||
|
|
||||||
|
if (strpbrk (label, "'= "))
|
||||||
|
- xasprintf (&data, "'%s'=%ld%s;", label, val, uom);
|
||||||
|
+ xasprintf (&data, "'%s'=%" PRId64 "%s;", label, val, uom);
|
||||||
|
else
|
||||||
|
- xasprintf (&data, "%s=%ld%s;", label, val, uom);
|
||||||
|
+ xasprintf (&data, "%s=%" PRId64 "%s;", label, val, uom);
|
||||||
|
|
||||||
|
if (warnp)
|
||||||
|
- xasprintf (&data, "%s%ld;", data, warn);
|
||||||
|
+ xasprintf (&data, "%s%" PRId64 ";", data, warn);
|
||||||
|
else
|
||||||
|
xasprintf (&data, "%s;", data);
|
||||||
|
|
||||||
|
if (critp)
|
||||||
|
- xasprintf (&data, "%s%ld;", data, crit);
|
||||||
|
+ xasprintf (&data, "%s%" PRId64 ";", data, crit);
|
||||||
|
else
|
||||||
|
xasprintf (&data, "%s;", data);
|
||||||
|
|
||||||
|
if (minp)
|
||||||
|
- xasprintf (&data, "%s%ld;", data, minv);
|
||||||
|
+ xasprintf (&data, "%s%" PRId64 ";", data, minv);
|
||||||
|
else
|
||||||
|
xasprintf (&data, "%s;", data);
|
||||||
|
|
||||||
|
if (maxp)
|
||||||
|
- xasprintf (&data, "%s%ld", data, maxv);
|
||||||
|
+ xasprintf (&data, "%s%" PRId64, data, maxv);
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
25
debian/patches/15_PRId64_PRIu64_2
vendored
Normal file
25
debian/patches/15_PRId64_PRIu64_2
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
From eb2dfdd5c24b87198b66397b224d6406c468a0bc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andreas Baumann <202930+andreasbaumann@users.noreply.github.com>
|
||||||
|
Date: Thu, 27 Oct 2022 22:48:18 +0200
|
||||||
|
Subject: [PATCH] fixed two PRId64 to PRIu64 in perfdata_uint64 (#1802)
|
||||||
|
|
||||||
|
---
|
||||||
|
plugins/utils.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/utils.c b/plugins/utils.c
|
||||||
|
index f75cf03b..b4214c61 100644
|
||||||
|
--- a/plugins/utils.c
|
||||||
|
+++ b/plugins/utils.c
|
||||||
|
@@ -615,9 +615,9 @@ char *perfdata_uint64 (const char *label,
|
||||||
|
char *data = NULL;
|
||||||
|
|
||||||
|
if (strpbrk (label, "'= "))
|
||||||
|
- xasprintf (&data, "'%s'=%" PRId64 "%s;", label, val, uom);
|
||||||
|
+ xasprintf (&data, "'%s'=%" PRIu64 "%s;", label, val, uom);
|
||||||
|
else
|
||||||
|
- xasprintf (&data, "%s=%" PRId64 "%s;", label, val, uom);
|
||||||
|
+ xasprintf (&data, "%s=%" PRIu64 "%s;", label, val, uom);
|
||||||
|
|
||||||
|
if (warnp)
|
||||||
|
xasprintf (&data, "%s%" PRIu64 ";", data, warn);
|
2
debian/patches/series
vendored
2
debian/patches/series
vendored
|
@ -2,3 +2,5 @@
|
||||||
03_epn
|
03_epn
|
||||||
# commited upstream
|
# commited upstream
|
||||||
13_check_http_fix_superflous_crlf
|
13_check_http_fix_superflous_crlf
|
||||||
|
14_PRId64_PRIu64_1
|
||||||
|
15_PRId64_PRIu64_2
|
||||||
|
|
Loading…
Reference in a new issue