pkgsrc-Bugs archive

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

Re: pkg/57173: yash: Cannot allocate memory



The following reply was made to PR pkg/57173; it has been noted by GNATS.

From: RVP <rvp%SDF.ORG@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/57173: yash: Cannot allocate memory
Date: Fri, 13 Jan 2023 23:36:44 +0000 (UTC)

 Can you try the patch below?
 
 Thanks,
 -RVP
 
 ---START---
 diff -urN yash-2.53.orig/configure yash-2.53/configure
 --- yash-2.53.orig/configure	2022-08-23 14:03:37.000000000 +0000
 +++ yash-2.53/configure	2023-01-13 23:31:35.507532000 +0000
 @@ -726,7 +726,6 @@
   #include <ncursesw/ncurses.h>
   #endif
   #include <${i%:*}>
 -int putchar(int);
 
   int main(void) {
   /* Undeclared identifiers are a syntax error in C99, but many compilers assume
 @@ -859,7 +858,14 @@
   checked
   if [ x"${checkresult}" = x"yes" ]
   then
 -    defconfigh "HAVE_STRNLEN"
 +    # NetBSD/ARM strnlen() is buggy when `maxlen' is very large, causing
 +    # an address wraparoound.  See:
 +    # https://mail-index.NetBSD.org/netbsd-users/2022/11/14/msg029205.html
 +    #
 +    case "$(uname -s):$(uname -m)" in
 +    NetBSD:*arm*|NetBSD:aarch64)   ;;
 +    *) defconfigh "HAVE_STRNLEN"   ;;
 +    esac
   fi
 
   # check for strdup
 ---END---
 


Home | Main Index | Thread Index | Old Index