The call is forbidden on non-desktop apps. The check on INVALID_HANDLE_VALUE should be good enough. --- mingw-w64-libraries/winpthreads/src/misc.h | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/mingw-w64-libraries/winpthreads/src/misc.h b/mingw-w64-libraries/winpthreads/src/misc.h index a86c0253..3a0e5fe8 100644 --- a/mingw-w64-libraries/winpthreads/src/misc.h +++ b/mingw-w64-libraries/winpthreads/src/misc.h @@ -24,6 +24,7 @@ #define WIN_PTHREADS_MISC_H #include "pthread_compat.h" +#include <winapifamily.h> #ifndef assert @@ -62,6 +63,11 @@ typedef long long LONGBAG; typedef long LONGBAG; #endif +#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) +#undef GetHandleInformation +#define GetHandleInformation(h,f) (1) +#endif + #define CHECK_HANDLE(h) { DWORD dwFlags; \ if (!(h) || ((h) == INVALID_HANDLE_VALUE) || !GetHandleInformation((h), &dwFlags)) \ return EINVAL; } -- 2.17.1 _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public