forked from pool/mingw64-runtime
Add mkstemp.diff
OBS-URL: https://build.opensuse.org/package/show/windows:mingw:win64/mingw64-runtime?expand=0&rev=36
This commit is contained in:
parent
e8f5363aa6
commit
247aae8b84
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 31 16:59:00 UTC 2015 - jengelh@inai.de
|
||||
|
||||
- Add mkstemp.diff, addressing broken behavior of mkstemp(),
|
||||
a newly implemented function since mingw 4.0.1.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 26 22:48:14 UTC 2015 - jengelh@inai.de
|
||||
|
||||
|
@ -27,6 +27,7 @@ Url: http://mingw-w64.sf.net/
|
||||
#DL-URL: http://downloads.sf.net/mingw-w64/mingw-w64-%version.tar.bz2
|
||||
Source: mingw-w64-crt-%version.tar.xz
|
||||
Source100: %{name}-rpmlintrc
|
||||
Patch1: mkstemp.diff
|
||||
#!BuildIgnore: post-build-checks
|
||||
BuildRequires: mingw64-cross-binutils
|
||||
BuildRequires: mingw64-cross-gcc-bootstrap >= 4.4.0
|
||||
@ -50,6 +51,7 @@ MinGW Win64 cross-compiler runtime, base libraries.
|
||||
|
||||
%prep
|
||||
%setup -q -n mingw-w64-crt
|
||||
%patch -P 1 -p1
|
||||
|
||||
%build
|
||||
%{_mingw64_configure} --disable-lib32 --enable-lib64
|
||||
|
23
mkstemp.diff
Normal file
23
mkstemp.diff
Normal file
@ -0,0 +1,23 @@
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: 2015-03-31 18:57:45.887248277 +0200
|
||||
References: https://sourceforge.net/p/mingw-w64/bugs/471/
|
||||
|
||||
When closing the file handle obtained from mkstemp(), the file
|
||||
ought _not_ to be deleted.
|
||||
---
|
||||
misc/mkstemp.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: mingw-w64-crt/misc/mkstemp.c
|
||||
===================================================================
|
||||
--- mingw-w64-crt.orig/misc/mkstemp.c
|
||||
+++ mingw-w64-crt/misc/mkstemp.c
|
||||
@@ -48,7 +48,7 @@ int __cdecl mkstemp (char *template_name
|
||||
template_name[j] = letters[rand () % 62];
|
||||
}
|
||||
fd = _sopen(template_name,
|
||||
- _O_RDWR | _O_CREAT | _O_EXCL | _O_TEMPORARY | _O_BINARY,
|
||||
+ _O_RDWR | _O_CREAT | _O_EXCL | _O_BINARY,
|
||||
_SH_DENYRW, _S_IREAD | _S_IWRITE);
|
||||
if (fd != -1) return fd;
|
||||
if (fd == -1 && errno != EEXIST) return -1;
|
Loading…
Reference in New Issue
Block a user