diff options
author | thorpej <thorpej@pkgsrc.org> | 2018-11-30 16:33:37 +0000 |
---|---|---|
committer | thorpej <thorpej@pkgsrc.org> | 2018-11-30 16:33:37 +0000 |
commit | 06ddc283bafab2690deb94f5002410993e98839d (patch) | |
tree | 5a06220857dcf1956e3ce809367cca2386cd8810 /sysutils | |
parent | b333ebeb80eef0ca4b25c2cd8957b1850716961f (diff) | |
download | pkgsrc-06ddc283bafab2690deb94f5002410993e98839d.tar.gz |
Make this build cleanly with clang on a macOS host.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/dc-tools/distinfo | 4 | ||||
-rw-r--r-- | sysutils/dc-tools/patches/patch-makeip.c | 43 | ||||
-rw-r--r-- | sysutils/dc-tools/patches/patch-scramble.c | 9 |
3 files changed, 55 insertions, 1 deletions
diff --git a/sysutils/dc-tools/distinfo b/sysutils/dc-tools/distinfo index 62803fc1cc7..2a9e36580e2 100644 --- a/sysutils/dc-tools/distinfo +++ b/sysutils/dc-tools/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.8 2016/07/06 10:09:33 abs Exp $ +$NetBSD: distinfo,v 1.9 2018/11/30 16:33:37 thorpej Exp $ SHA1 (dc-tools/1.6.tar.gz) = eed5be42a30bc7221c5308db5b46b8996775fdef RMD160 (dc-tools/1.6.tar.gz) = ca538169072c8124276dd460e0b55d31d6170850 @@ -20,3 +20,5 @@ SHA1 (dc-tools/serial_slave.tar.gz) = 56e77360d5f6dd0336a11fe9f117655afe9a8792 RMD160 (dc-tools/serial_slave.tar.gz) = a5e06803ccb5bee7f6d76fa0619e90473358ae2a SHA512 (dc-tools/serial_slave.tar.gz) = d717297a1a70fabf2b613d89c31c3ff3da642be2b4cd1507378bedea0f1cfe4505a71a25540797ed1f2b14ab934ce12ba3ab1ff1db7b79c1fef7d7b7dd68373f Size (dc-tools/serial_slave.tar.gz) = 9524 bytes +SHA1 (patch-makeip.c) = 5466b370f663349cb40bd19eacac62b88d461f08 +SHA1 (patch-scramble.c) = f6c22806523a1b75f8558d86c76110b749830867 diff --git a/sysutils/dc-tools/patches/patch-makeip.c b/sysutils/dc-tools/patches/patch-makeip.c new file mode 100644 index 00000000000..5ea3e2610e2 --- /dev/null +++ b/sysutils/dc-tools/patches/patch-makeip.c @@ -0,0 +1,43 @@ +--- makeip.c.orig 2000-09-05 11:56:58.000000000 -0700 ++++ makeip.c 2018-11-30 08:24:17.000000000 -0800 +@@ -74,7 +74,7 @@ int parse_input(FILE *fh, char *ip) + while(fgets(buf, sizeof(buf), fh)) { + char *p; + trim(buf); +- if(*buf) ++ if(*buf) { + if((p = strchr(buf, ':'))) { + *p++ = '\0'; + trim(buf); +@@ -89,7 +89,7 @@ int parse_input(FILE *fh, char *ip) + while(*p == ' ' || *p == '\t') + p++; + if(strlen(p)>fields[i].len) { +- fprintf(stderr, "Data for field \"%s\" is too long.\n", fields[i]); ++ fprintf(stderr, "Data for field \"%s\" is too long.\n", fields[i].name); + return 0; + } + memcpy(ip+fields[i].pos, p, strlen(p)); +@@ -101,11 +101,12 @@ int parse_input(FILE *fh, char *ip) + fprintf(stderr, "Missing : on line.\n"); + return 0; + } ++ } + } + + for(i=0; i<NUM_FIELDS; i++) + if(!filled_in[i]) { +- fprintf(stderr, "Missing value for \"%s\".\n", fields[i]); ++ fprintf(stderr, "Missing value for \"%s\".\n", fields[i].name); + return 0; + } + +@@ -183,7 +184,7 @@ int main(int argc, char *argv[]) + + ip_tmpl = getenv("IP_TEMPLATE_FILE"); + if(ip_tmpl == NULL) +- ip_tmpl = "IP.TMPL"; ++ ip_tmpl = "/usr/local/pkg/share/dc-tools/IP.TMPL"; + + makeip(ip_tmpl, argv[1], argv[2]); + diff --git a/sysutils/dc-tools/patches/patch-scramble.c b/sysutils/dc-tools/patches/patch-scramble.c new file mode 100644 index 00000000000..e00e636f37f --- /dev/null +++ b/sysutils/dc-tools/patches/patch-scramble.c @@ -0,0 +1,9 @@ +--- scramble.c.orig 2018-11-30 08:21:21.000000000 -0800 ++++ scramble.c 2018-11-30 08:21:35.000000000 -0800 +@@ -1,5 +1,6 @@ + #include <stdio.h> + #include <stdlib.h> ++#include <string.h> + + #define MAXCHUNK (2048*1024) + |