aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2021-10-24 18:08:10 +0200
committerSören Tempel <soeren+git@soeren-tempel.net>2021-10-24 18:08:10 +0200
commitcbeb8157ed224df14f6e17b3a5690888f6949e89 (patch)
treedf7674e4733a06929cff53637f5274900b314314
parent245a8ee7cd31778bf7db647e256f7c6fd3d348f9 (diff)
downloadaports-cbeb8157ed224df14f6e17b3a5690888f6949e89.tar.gz
aports-cbeb8157ed224df14f6e17b3a5690888f6949e89.tar.bz2
aports-cbeb8157ed224df14f6e17b3a5690888f6949e89.tar.xz
community/liboping: fix build
-rw-r--r--community/liboping/APKBUILD8
-rw-r--r--community/liboping/fix-format-string.patch20
2 files changed, 26 insertions, 2 deletions
diff --git a/community/liboping/APKBUILD b/community/liboping/APKBUILD
index 16a931e8e1d..ea5ac7de8f5 100644
--- a/community/liboping/APKBUILD
+++ b/community/liboping/APKBUILD
@@ -9,7 +9,8 @@ arch="all"
license="LGPL-2.0-or-later"
makedepends="ncurses-dev"
subpackages="$pkgname-dev $pkgname-doc"
-source="http://verplant.org/liboping/files/liboping-$pkgver.tar.bz2"
+source="http://verplant.org/liboping/files/liboping-$pkgver.tar.bz2
+ fix-format-string.patch"
prepare() {
default_prepare
@@ -31,4 +32,7 @@ package() {
make install DESTDIR="$pkgdir"
}
-sha512sums="f1e9984cf0c1df89b29f7bc657c19a5439019db7643680744d8f353664b6a53070581f40b51e72f896c7df88799c6868257f6308e1a9d84b4d2a0666491214d8 liboping-1.10.0.tar.bz2"
+sha512sums="
+f1e9984cf0c1df89b29f7bc657c19a5439019db7643680744d8f353664b6a53070581f40b51e72f896c7df88799c6868257f6308e1a9d84b4d2a0666491214d8 liboping-1.10.0.tar.bz2
+d160869af0569ddb33d9f4643a628849408fbe8202cc5be16e8889eb53d9a0380f5e922f20ed3e88c6861512337ced4e5ae97525aff4392d8804cd82ce407c23 fix-format-string.patch
+"
diff --git a/community/liboping/fix-format-string.patch b/community/liboping/fix-format-string.patch
new file mode 100644
index 00000000000..6aaff3cc24a
--- /dev/null
+++ b/community/liboping/fix-format-string.patch
@@ -0,0 +1,20 @@
+Without this patch the printf invocation takes more argument that it has
+format strings, since the format_qos() output string is printed in the
+if statement following the HOST_PRINTF invocation, I believe this to be
+an accidental error made in the following commit:
+
+ https://github.com/octo/liboping/commit/66464b61f8ee756dcfc0081944f4367da2b1a6ab
+
+diff -upr liboping-1.10.0.orig/src/oping.c liboping-1.10.0/src/oping.c
+--- liboping-1.10.0.orig/src/oping.c 2021-10-24 13:13:36.850533766 +0200
++++ liboping-1.10.0/src/oping.c 2021-10-24 13:13:49.790711547 +0200
+@@ -1600,8 +1600,7 @@ static void update_host_hook (pingobj_it
+
+ HOST_PRINTF ("%zu bytes from %s (%s): icmp_seq=%u ttl=%i ",
+ data_len, context->host, context->addr,
+- sequence, recv_ttl,
+- format_qos (recv_qos, recv_qos_str, sizeof (recv_qos_str)));
++ sequence, recv_ttl);
+ if ((recv_qos != 0) || (opt_send_qos != 0))
+ {
+ HOST_PRINTF ("qos=%s ",