Skip to content

Commit 1fd1d5f

Browse files
committed
Build failed on Windows
1 parent 0d09000 commit 1fd1d5f

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

examples/HttpDemo/.vscode/launch.json

+11
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7+
{
8+
"name": "(Windows) launch",
9+
"type": "cppvsdbg",
10+
"request": "launch",
11+
"program": "${workspaceFolder}/http-server.exe",
12+
"args": [],
13+
"stopAtEntry": false,
14+
"cwd": "${workspaceFolder}",
15+
"environment": [],
16+
"externalConsole": true
17+
},
718
{
819
"name": "(gdb) Launch-client",
920
"type": "cppdbg",

source/hunt/http/server/HttpSession.d

+2
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,8 @@ ubyte[] getRandom(ushort len = 64)
481481
ubyte[] buffer;
482482
buffer.length = len;
483483
version(Windows){
484+
import core.sys.windows.wincrypt;
485+
import core.sys.windows.windef;
484486
HCRYPTPROV hCryptProv;
485487
assert(CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT) != 0);
486488
CryptGenRandom(hCryptProv, cast(DWORD)buffer.length, buffer.ptr);

0 commit comments

Comments
 (0)