diff --git a/memleak.patch b/memleak.patch new file mode 100644 index 0000000..ab88bbb --- /dev/null +++ b/memleak.patch @@ -0,0 +1,16 @@ +Index: winpthreads/src/thread.c +=================================================================== +--- winpthreads.orig/src/thread.c ++++ winpthreads/src/thread.c +@@ -295,8 +295,10 @@ push_pthread_mem (_pthread_v *sv) + memset (sv, 0, sizeof(struct _pthread_v)); + if (pthr_last == NULL) + pthr_root = pthr_last = sv; +- else ++ else { + pthr_last->next = sv; ++ pthr_last = sv; ++ } + pthread_mutex_unlock (&mtx_pthr_locked); + } + diff --git a/mingw64-winpthreads.spec b/mingw64-winpthreads.spec index f952395..87ff4b1 100644 --- a/mingw64-winpthreads.spec +++ b/mingw64-winpthreads.spec @@ -27,6 +27,7 @@ Url: http://mingw-w64.sf.net/ #DL-URL: http://downloads.sf.net/mingw-w64/mingw-w64-v5.0-rc1.tar.bz2 Source: mingw-w64-winpthreads-%version.tar.xz Source9: %name-rpmlintrc +Patch1: memleak.patch BuildRequires: mingw64-cross-gcc-bootstrap BuildRequires: mingw64-cross-pkg-config BuildRequires: mingw64-filesystem @@ -63,6 +64,7 @@ mingw-w64's implementation of POSIX threads for Windows. %prep %setup -q -n winpthreads +%patch1 -p1 %build # The build is trying to link with libpthread.a but it has no need