diff --git a/nsprpub/pr/src/md/windows/w95thred.c b/nsprpub/pr/src/md/windows/w95thred.c index be92e2089f9e4..687bea1dd3dde 100644 --- a/nsprpub/pr/src/md/windows/w95thred.c +++ b/nsprpub/pr/src/md/windows/w95thred.c @@ -5,6 +5,8 @@ #include "primpl.h" #include /* for _beginthreadex() */ +#include +#include #if defined(_MSC_VER) && _MSC_VER <= 1200 /* @@ -217,6 +219,10 @@ _PR_MD_CLEAN_THREAD(PRThread *thread) if (thread->md.handle) { rv = CloseHandle(thread->md.handle); + if (!rv) { + fprintf(stderr, "CloseHandle failed, handle: %x, last error: %x\n", + (void*)thread->md.handle, GetLastError()); + } PR_ASSERT(rv); thread->md.handle = 0; }