[packages/clink] Rel 7
arekm
arekm at pld-linux.org
Wed May 20 21:04:32 CEST 2026
commit d0373ba4d717f6991c549302b4f940f5946f1d84
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed May 20 21:04:16 2026 +0200
Rel 7
clink-c99.patch | 45 +++++++++++++++++++++++++++++++++++++++++++++
clink.spec | 6 ++++--
2 files changed, 49 insertions(+), 2 deletions(-)
---
diff --git a/clink.spec b/clink.spec
index 75dad51..d13fba2 100644
--- a/clink.spec
+++ b/clink.spec
@@ -2,13 +2,14 @@ Summary: Clink estimates the latency and bandwidth of network links
Summary(pl.UTF-8): Clink określa przybliżone opóźnienie i pasmo połączenia sieciowego
Name: clink
Version: 1.0
-Release: 6
+Release: 7
License: GPL v2+
Group: Applications/Networking
Source0: http://allendowney.com/research/clink/%{name}.%{version}.tar.gz
# Source0-md5: 9bfb957d7733e434a5e902dccad89c56
# formerly ftp://ftp.6bone.pl/pub/ipv6/set-glibc-2.1.new/clink.1.0a.diff
Patch0: clink.1.0a.diff
+Patch1: %{name}-c99.patch
URL: http://allendowney.com/research/clink/
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -27,11 +28,12 @@ z pojedynczego źródła.
%prep
%setup -q -n %{name}.%{version}
%patch -P0 -p1
+%patch -P1 -p1
%build
%{__make} \
CC="%{__cc}" \
- CFLAGS="%{rpmcflags} -D_GNU_SOURCE"
+ CFLAGS="%{rpmcflags} %{rpmcppflags} -D_GNU_SOURCE"
%install
rm -rf $RPM_BUILD_ROOT
diff --git a/clink-c99.patch b/clink-c99.patch
new file mode 100644
index 0000000..bd729aa
--- /dev/null
+++ b/clink-c99.patch
@@ -0,0 +1,45 @@
+Add missing prototypes and fix pre-C99 declarations rejected by modern gcc.
+
+- Prototype Malloc (util.c), clink_init/send_probe (collect.c), and
+ send_one_probe (process.c) in clink.h so all three translation units
+ agree on the signatures. Without these, gcc 14+ rejects the implicit
+ declarations and the (int)->pointer return cast in process.c is
+ genuinely wrong.
+- Fix int-returning fiddle_link() to return 0 on the NULL early-exit
+ branch instead of bare "return;".
+- Give main() an explicit int return type.
+
+--- clink.1.0/clink.h 1999-08-14 22:47:04.000000000 +0200
++++ clink.1.0/clink.h 2026-05-20 18:49:18.311511032 +0200
+@@ -110,5 +110,11 @@
+ void microsleep (int usecs);
+ int convert_sockaddr (char *ip_addr, Sockaddr_in *addr, socklen_t salen);
+
++/* defined in util.c, collect.c, process.c */
++void *Malloc(size_t size);
++void clink_init (char *host, int sport0, int tos);
++int send_probe (int size, int ttl, int timeout, Datum *datum);
++int send_one_probe (int size, int ttl);
++
+
+
+--- clink.1.0/process.c 2026-05-20 18:49:10.693030980 +0200
++++ clink.1.0/process.c 2026-05-20 18:49:39.197444518 +0200
+@@ -972,7 +972,7 @@
+ int i, ret;
+ int n = 0;
+
+- if (link == NULL) return;
++ if (link == NULL) return 0;
+
+ /* get more data for any size with a positive residual */
+ process_link (link);
+@@ -1326,7 +1326,7 @@
+
+ /* main: process the options and call the appropriate procedures */
+
+-main (int argc, char *argv[])
++int main (int argc, char *argv[])
+ {
+ int i, c;
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/clink.git/commitdiff/d0373ba4d717f6991c549302b4f940f5946f1d84
More information about the pld-cvs-commit
mailing list