Fridrich Strba 2021-07-08 07:18:41 +00:00 committed by Git OBS Bridge
parent 1bde6096fe
commit c511126d07
3 changed files with 25 additions and 1 deletions

View File

@ -0,0 +1,14 @@
--- mingw-w64-v9.0.0/mingw-w64-headers/crt/sec_api/string_s.h 2021-05-22 14:34:25.000000000 +0200
+++ mingw-w64-v9.0.0/mingw-w64-headers/crt/sec_api/string_s.h 2021-07-08 09:10:48.082143084 +0200
@@ -43,9 +43,11 @@
_CRTIMP errno_t __cdecl strcat_s(char *_Dst, rsize_t _SizeInBytes, const char * _Src);
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1(errno_t, strcat_s, char, _Dest, const char *, _Source)
+#ifdef _NEEDS_STRNLEN_S
__forceinline size_t __cdecl strnlen_s(const char * _src, size_t _count) {
return _src ? strnlen(_src, _count) : 0;
}
+#endif
_SECIMP errno_t __cdecl memmove_s(void *_dest,size_t _numberOfElements,const void *_src,size_t _count);
#ifndef _WSTRING_S_DEFINED

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Thu Jul 8 07:13:22 UTC 2021 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* mingw-w64-v9.0.0-strnlen_s.patch
+ work around the "multiple definition of `strnlen_s'" error
+ the function still accessible by defining _NEEDS_STRNLEN_S
before inclusion of the header
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jul 2 12:34:00 UTC 2021 - Jan Engelhardt <jengelh@inai.de> Fri Jul 2 12:34:00 UTC 2021 - Jan Engelhardt <jengelh@inai.de>

View File

@ -25,6 +25,7 @@ Group: Development/Libraries/C and C++
URL: http://mingw-w64.sf.net/ URL: http://mingw-w64.sf.net/
Source: http://downloads.sf.net/mingw-w64/mingw-w64-v%{version}.tar.bz2 Source: http://downloads.sf.net/mingw-w64/mingw-w64-v%{version}.tar.bz2
Source1000: %name-rpmlintrc Source1000: %name-rpmlintrc
Patch0: mingw-w64-v9.0.0-strnlen_s.patch
BuildRequires: mingw32-filesystem BuildRequires: mingw32-filesystem
BuildRequires: xz BuildRequires: xz
#!BuildIgnore: post-build-checks #!BuildIgnore: post-build-checks
@ -49,7 +50,7 @@ and only exist to satisfy dependencies in MinGW's unistd.h until
an actual pthread implementation (like winpthreads) is installed. an actual pthread implementation (like winpthreads) is installed.
%prep %prep
%autosetup -n mingw-w64-v%version/mingw-w64-headers %autosetup -n mingw-w64-v%version/mingw-w64-headers -p2
%build %build
%_mingw32_configure \ %_mingw32_configure \