ttcp: fix url, rename patch
authorArnaud Aujon <arnaud.aujon@gmail.com>
Sun, 17 Nov 2013 15:34:00 +0000 (16:34 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 18 Nov 2013 20:59:12 +0000 (21:59 +0100)
 - fix download url : isn't available on previous ftp, use an other one
   instead
 - add version according to source code version
 - rename and clean patch according to patch policy

[Peter: adjust upstream URL in Config.in]
Signed-off-by: Arnaud Aujon <arnaud.aujon@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/ttcp/Config.in
package/ttcp/ttcp-0001-replace-deprecated-bcopy.patch [new file with mode: 0644]
package/ttcp/ttcp-bcopy.patch [deleted file]
package/ttcp/ttcp.mk

index 0262fc9e334682aa3a29ebae68dcaafbf4bf16e7..cf68eff33c69dff66de537b57a1f5bb067c2c4ea 100644 (file)
@@ -4,4 +4,4 @@ config BR2_PACKAGE_TTCP
        help
          Benchmarking tool for determining TCP and UDP performance.
 
-         ftp://ftp.sunet.se/pub/network/monitoring/ttcp/
+         ftp://ftp.sgi.com/sgi/src/ttcp/README
diff --git a/package/ttcp/ttcp-0001-replace-deprecated-bcopy.patch b/package/ttcp/ttcp-0001-replace-deprecated-bcopy.patch
new file mode 100644 (file)
index 0000000..fb8ef7f
--- /dev/null
@@ -0,0 +1,15 @@
+Replace deprecated bcopy call by using memmove instead.
+
+Index: b/ttcp.c
+===================================================================
+--- a/ttcp.c
++++ b/ttcp.c
+@@ -241,7 +241,7 @@
+                       if ((addr=gethostbyname(host)) == NULL)
+                               err("bad hostname");
+                       sinhim.sin_family = addr->h_addrtype;
+-                      bcopy(addr->h_addr,(char*)&addr_tmp, addr->h_length);
++                      memmove((char*)&addr_tmp, addr->h_addr, addr->h_length);
+ #if defined(cray)
+                       sinhim.sin_addr = addr_tmp;
+ #else
diff --git a/package/ttcp/ttcp-bcopy.patch b/package/ttcp/ttcp-bcopy.patch
deleted file mode 100644 (file)
index c98c88f..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urN ttcp-0rig/ttcp.c ttcp/ttcp.c
---- ttcp-0rig/ttcp.c   1993-05-17 00:00:00.000000000 +0200
-+++ ttcp/ttcp.c        2009-01-14 23:46:19.000000000 +0100
-@@ -241,7 +241,7 @@
-                       if ((addr=gethostbyname(host)) == NULL)
-                               err("bad hostname");
-                       sinhim.sin_family = addr->h_addrtype;
--                      bcopy(addr->h_addr,(char*)&addr_tmp, addr->h_length);
-+                      memmove((char*)&addr_tmp, addr->h_addr, addr->h_length);
- #if defined(cray)
-                       sinhim.sin_addr = addr_tmp;
- #else
index b65949de561cb19c87ce53c86e981fce4b4f0448..7667b20617cb40657dbb0445b320a234d7497927 100644 (file)
@@ -4,9 +4,8 @@
 #
 ################################################################################
 
-#
-TTCP_VERSION =
-TTCP_SITE    = http://ftp.sunet.se/pub/network/monitoring/ttcp
+TTCP_VERSION = 1.12
+TTCP_SITE    = ftp://ftp.sgi.com/sgi/src/ttcp/
 TTCP_SOURCE  = ttcp.c
 TTCP_LICENSE = public domain