-
-
Save BlockMen/f5571751ad5dba9f5dc1 to your computer and use it in GitHub Desktop.
Patch for #1102
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -17,8 +17,6 @@ | |
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
*/ | |
#include "jthread/jsemaphore.h" | |
-#include <assert.h> | |
-#include <windows.h> | |
JSemaphore::JSemaphore() { | |
m_hSemaphore = CreateSemaphore( | |
@@ -81,13 +79,13 @@ typedef LONG (NTAPI *_NtQuerySemaphore)( | |
ULONG MaximumCount; | |
} SEMAPHORE_BASIC_INFORMATION; | |
-NtQuerySemaphore = | |
+_NtQuerySemaphore newNtQuerySemaphore = | |
(_NtQuerySemaphore) | |
GetProcAddress | |
(GetModuleHandle ("ntdll.dll"), "NtQuerySemaphore"); | |
int JSemaphore::GetValue() { | |
- _NtQuerySemaphore NtQuerySemaphore; | |
+ _NtQuerySemaphore NtQuerySemaphore = newNtQuerySemaphore; | |
SEMAPHORE_BASIC_INFORMATION BasicInfo; | |
LONG retval; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment