pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/picasm devel/picasm: fix build failure on NetBSD



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e54a969100c1
branches:  trunk
changeset: 771791:e54a969100c1
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Mon Dec 27 04:54:04 2021 +0000

description:
devel/picasm: fix build failure on NetBSD

diffstat:

 devel/picasm/distinfo               |   4 ++--
 devel/picasm/patches/patch-picasm.c |  12 +++++++++++-
 2 files changed, 13 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r ef49138c783c -r e54a969100c1 devel/picasm/distinfo
--- a/devel/picasm/distinfo     Mon Dec 27 04:35:48 2021 +0000
+++ b/devel/picasm/distinfo     Mon Dec 27 04:54:04 2021 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.4 2021/10/26 10:18:03 nia Exp $
+$NetBSD: distinfo,v 1.5 2021/12/27 04:54:04 dholland Exp $
 
 BLAKE2s (picasm114.tar.bz2) = 24f4e977aae5360fcb5a45a2fff58d22008e05103143aece1c1e713820855dfd
 SHA512 (picasm114.tar.bz2) = a6a8490156afe8af1fc85700890570c745c076396890491f4efe004d7dd701a324f9c7e764fcc710c8954c761f3abb4ed8e97c72ce098100192ead334b335fb7
 Size (picasm114.tar.bz2) = 35429 bytes
-SHA1 (patch-picasm.c) = 1d14ab94f988b35b14cbf05476eab9e14337ef18
+SHA1 (patch-picasm.c) = 4d7b1e68422f70735dd45b55422df2ef077a0f61
diff -r ef49138c783c -r e54a969100c1 devel/picasm/patches/patch-picasm.c
--- a/devel/picasm/patches/patch-picasm.c       Mon Dec 27 04:35:48 2021 +0000
+++ b/devel/picasm/patches/patch-picasm.c       Mon Dec 27 04:54:04 2021 +0000
@@ -1,10 +1,20 @@
-$NetBSD: patch-picasm.c,v 1.2 2020/03/18 17:52:39 joerg Exp $
+$NetBSD: patch-picasm.c,v 1.3 2021/12/27 04:54:04 dholland Exp $
 
 Fix tautological check.
 Remove unused variable.
+Use memcpy instead of strncpy for copying an already-computed length.
 
 --- picasm.c.orig      2005-06-29 07:05:34.000000000 +0000
 +++ picasm.c
+@@ -109,7 +109,7 @@ err_line_ref(void)
+       len = strlen(line_buffer);
+       if(len > 100)
+           len = 100;
+-      strncpy(outbuf, line_buffer, len);
++      memcpy(outbuf, line_buffer, len);
+       outbuf[len] = '\0';
+       err_out(outbuf);
+     }
 @@ -895,7 +895,7 @@ gen_byte_c(int instr_code)
        sym = lookup_symbol(token_string, symtype);
        if(sym != NULL && sym->type != SYM_FORWARD)



Home | Main Index | Thread Index | Old Index