diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2012-12-23 11:48:30 +0100 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2013-11-06 00:57:03 -0600 |
commit | b49d0a636b226866bf9a19bbea02d9714bcaef2c (patch) | |
tree | 8c0aad35e0335b20dd49ae1a1b71689c35381045 /network/netcat-openbsd/patches/0003-get-sev-by-name.patch | |
parent | 36b9d2ef47a33d7cfb19879dca67f3250a4c2b4e (diff) |
network/netcat-openbsd: Updated for version 1.105 (from Debian).
Apply the patches locally and added a note
about this package being incompatible with nc from Slackware
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'network/netcat-openbsd/patches/0003-get-sev-by-name.patch')
-rw-r--r-- | network/netcat-openbsd/patches/0003-get-sev-by-name.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/network/netcat-openbsd/patches/0003-get-sev-by-name.patch b/network/netcat-openbsd/patches/0003-get-sev-by-name.patch new file mode 100644 index 0000000000..1d1cca8a46 --- /dev/null +++ b/network/netcat-openbsd/patches/0003-get-sev-by-name.patch @@ -0,0 +1,34 @@ +From: Aron Xu <aron@debian.org> +Date: Mon, 13 Feb 2012 14:45:08 +0800 +Subject: get sev by name + +--- + netcat.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/netcat.c b/netcat.c +index f3cc8c1..d912544 100644 +--- a/netcat.c ++++ b/netcat.c +@@ -949,12 +949,19 @@ atelnet(int nfd, unsigned char *buf, unsigned int size) + void + build_ports(char *p) + { ++ struct servent *sv; + const char *errstr; + char *n; + int hi, lo, cp; + int x = 0; + +- if ((n = strchr(p, '-')) != NULL) { ++ sv = getservbyname(p, uflag ? "udp" : "tcp"); ++ if (sv) { ++ portlist[0] = calloc(1, PORT_MAX_LEN); ++ if (portlist[0] == NULL) ++ err(1, NULL); ++ snprintf(portlist[0], PORT_MAX_LEN, "%d", ntohs(sv->s_port)); ++ } else if ((n = strchr(p, '-')) != NULL) { + *n = '\0'; + n++; + +-- |