Summary(pl.UTF-8): Implementacja komponentu POSIX Threads dla Win32 - wersja skrośna dla MinGW32
Name: crossmingw32-pthreads-w32
Version: 2.11.0
-Release: 1
+Release: 2
License: LGPL v2.1
Group: Development/Libraries
Source0: https://downloads.sourceforge.net/pthreads4w/pthreads4w-code-v%{version}.zip
# Source0-md5: 75c3ade4fa6aeff1d1d25d33f6bbce12
+Patch0: pthreads4w-winsock.patch
URL: https://sourceforge.net/p/pthreads4w/wiki/Home/
BuildRequires: crossmingw32-gcc
BuildRequires: crossmingw32-runtime >= 1:5.4.2-2
%prep
%setup -q -n pthreads4w-code-9808f0b151e6c6efe2d57f3b54a1fb9a19d1eb88
+%patch0 -p1
mkdir lib
--- /dev/null
+Avoid <winsock.h> as it conflicts with <winsock2.h>; <winerror.h> is enough here
+
+--- pthreads4w-code-9808f0b151e6c6efe2d57f3b54a1fb9a19d1eb88/_ptw32.h.orig 2018-08-08 12:49:00.000000000 +0200
++++ pthreads4w-code-9808f0b151e6c6efe2d57f3b54a1fb9a19d1eb88/_ptw32.h 2023-07-05 20:16:58.381825453 +0200
+@@ -165,7 +165,7 @@
+ * note: ETIMEDOUT is no longer defined in winsock.h
+ * WSAETIMEDOUT is so use its value.
+ */
+-# include <winsock.h>
++# include <winerror.h>
+ # if defined(WSAETIMEDOUT)
+ # define ETIMEDOUT WSAETIMEDOUT
+ # else