commit
097a91b918
27
pkgs/tools/networking/nttcp/default.nix
Normal file
27
pkgs/tools/networking/nttcp/default.nix
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{ lib, stdenv, fetchurl, ... }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "nttcp";
|
||||||
|
version = "1.47";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://deb.debian.org/debian/pool/non-free/n/nttcp/nttcp_${version}.orig.tar.gz";
|
||||||
|
sha256 = "1bl17dsd53lbpjdqfmpgpd7dms6d2w3scpg7ki7qgfjhs8sarq50";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Fix format string compiler error
|
||||||
|
./format-security.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
makeFlags = [
|
||||||
|
"prefix=${placeholder "out"}"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "New test TCP program";
|
||||||
|
license = licenses.unfree;
|
||||||
|
maintainers = with maintainers; [ angustrau ];
|
||||||
|
platforms = platforms.all;
|
||||||
|
};
|
||||||
|
}
|
12
pkgs/tools/networking/nttcp/format-security.patch
Normal file
12
pkgs/tools/networking/nttcp/format-security.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -Nur -x '*.orig' -x '*~' nttcp-1.47/nttcp.c nttcp-1.47.new/nttcp.c
|
||||||
|
--- nttcp-1.47/nttcp.c 2000-12-18 05:16:54.000000000 -0500
|
||||||
|
+++ nttcp-1.47.new/nttcp.c 2012-01-30 23:44:02.260501225 -0500
|
||||||
|
@@ -372,7 +372,7 @@
|
||||||
|
#define Message(x) fMessage(stdout, x)
|
||||||
|
|
||||||
|
void Exit(char *s, int ret) {
|
||||||
|
- syslog(LOG_DEBUG, s);
|
||||||
|
+ syslog(LOG_DEBUG, "%s", s);
|
||||||
|
fMessage(stderr,s);
|
||||||
|
exit(ret);
|
||||||
|
}
|
@ -7546,6 +7546,8 @@ in
|
|||||||
|
|
||||||
numlockx = callPackage ../tools/X11/numlockx { };
|
numlockx = callPackage ../tools/X11/numlockx { };
|
||||||
|
|
||||||
|
nttcp = callPackage ../tools/networking/nttcp { };
|
||||||
|
|
||||||
nuttcp = callPackage ../tools/networking/nuttcp { };
|
nuttcp = callPackage ../tools/networking/nuttcp { };
|
||||||
|
|
||||||
nssmdns = callPackage ../tools/networking/nss-mdns { };
|
nssmdns = callPackage ../tools/networking/nss-mdns { };
|
||||||
|
Loading…
Reference in New Issue
Block a user