From a4ad79ed17360718f04c4e958f2a57aa9dd08d73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Apestegu=C3=ADa?= Date: Thu, 21 Nov 2024 20:18:30 +0100 Subject: [PATCH] cad/stepcode: Fix build in current --- cad/stepcode/Makefile | 1 + .../files/patch-include_cllazyfile_judyS2Array.h | 11 +++++++++++ .../files/patch-include_cllazyfile_judySArray.h | 11 +++++++++++ 3 files changed, 23 insertions(+) create mode 100644 cad/stepcode/files/patch-include_cllazyfile_judyS2Array.h create mode 100644 cad/stepcode/files/patch-include_cllazyfile_judySArray.h diff --git a/cad/stepcode/Makefile b/cad/stepcode/Makefile index 32cb745a8431..d733583f4e61 100644 --- a/cad/stepcode/Makefile +++ b/cad/stepcode/Makefile @@ -1,6 +1,7 @@ PORTNAME= stepcode PORTVERSION= 0.8.2 DISTVERSIONPREFIX= v +PORTREVISION= 1 CATEGORIES= cad MAINTAINER= fernape@FreeBSD.org diff --git a/cad/stepcode/files/patch-include_cllazyfile_judyS2Array.h b/cad/stepcode/files/patch-include_cllazyfile_judyS2Array.h new file mode 100644 index 000000000000..cb3437316917 --- /dev/null +++ b/cad/stepcode/files/patch-include_cllazyfile_judyS2Array.h @@ -0,0 +1,11 @@ +--- include/cllazyfile/judyS2Array.h.orig 2024-11-21 19:04:57 UTC ++++ include/cllazyfile/judyS2Array.h +@@ -51,7 +51,7 @@ class judyS2Array { + explicit judyS2Array( const judyS2Array< JudyValue > & other ): _maxKeyLen( other._maxKeyLen ), _success( other._success ) { + _judyarray = judy_clone( other._judyarray ); + _buff = new unsigned char[_maxKeyLen]; +- strncpy( _buff, other._buff, _maxKeyLen ); ++ strncpy( (char*)_buff, (char*)other._buff, _maxKeyLen ); + _buff[ _maxKeyLen ] = '\0'; //ensure that _buff is null-terminated, since strncpy won't necessarily do so + find( _buff ); //set _lastSlot + } diff --git a/cad/stepcode/files/patch-include_cllazyfile_judySArray.h b/cad/stepcode/files/patch-include_cllazyfile_judySArray.h new file mode 100644 index 000000000000..b943afbde19e --- /dev/null +++ b/cad/stepcode/files/patch-include_cllazyfile_judySArray.h @@ -0,0 +1,11 @@ +--- include/cllazyfile/judySArray.h.orig 2024-11-21 18:30:49 UTC ++++ include/cllazyfile/judySArray.h +@@ -39,7 +39,7 @@ class judySArray { + explicit judySArray( const judySArray< JudyValue > & other ): _maxKeyLen( other._maxKeyLen ), _success( other._success ) { + _judyarray = judy_clone( other._judyarray ); + _buff = new unsigned char[_maxKeyLen]; +- strncpy( _buff, other._buff, _maxKeyLen ); ++ strncpy( (char*)_buff, (char*)other._buff, _maxKeyLen ); + _buff[ _maxKeyLen ] = '\0'; //ensure that _buff is null-terminated, since strncpy won't necessarily do so + find( _buff ); //set _lastSlot + }