unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 53868bb3ce77e9b89a169b22c4b8f2c7ead5b399 670 bytes (raw)
name: gnu/packages/patches/netcat-openbsd-get-sev-by-name.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
From: Aron Xu <aron@debian.org>
Date: Mon, 13 Feb 2012 14:45:08 +0800
Subject: get sev by name

---
 netcat.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- a/netcat.c
+++ b/netcat.c
@@ -1679,11 +1679,16 @@ strtoport(char *portstr, int udp)
 void
 build_ports(char *p)
 {
+	struct servent *sv;
 	char *n;
 	int hi, lo, cp;
 	int x = 0;
 
-	if (isdigit((unsigned char)*p) && (n = strchr(p, '-')) != NULL) {
+	sv = getservbyname(p, uflag ? "udp" : "tcp");
+	if (sv) {
+		if (asprintf(&portlist[0], "%d", ntohs(sv->s_port)) < 0)
+			err(1, "asprintf");
+	} else if (isdigit((unsigned char)*p) && (n = strchr(p, '-')) != NULL) {
 		*n = '\0';
 		n++;
 

debug log:

solving 53868bb3ce ...
found 53868bb3ce in https://yhetil.org/guix-patches/3dfac477-b081-49f4-86b3-2c142bb39f6b@www.fastmail.com/

applying [1/1] https://yhetil.org/guix-patches/3dfac477-b081-49f4-86b3-2c142bb39f6b@www.fastmail.com/
diff --git a/gnu/packages/patches/netcat-openbsd-get-sev-by-name.patch b/gnu/packages/patches/netcat-openbsd-get-sev-by-name.patch
new file mode 100644
index 0000000000..53868bb3ce

1:22: space before tab in indent.
 	char *n;
1:23: space before tab in indent.
 	int hi, lo, cp;
1:24: space before tab in indent.
 	int x = 0;
1:25: trailing whitespace.
 
1:32: space before tab in indent.
 		*n = '\0';
Checking patch gnu/packages/patches/netcat-openbsd-get-sev-by-name.patch...
Applied patch gnu/packages/patches/netcat-openbsd-get-sev-by-name.patch cleanly.
warning: squelched 3 whitespace errors
warning: 8 lines add whitespace errors.

index at:
100644 53868bb3ce77e9b89a169b22c4b8f2c7ead5b399	gnu/packages/patches/netcat-openbsd-get-sev-by-name.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).