build,win: work around missing uuid.dll on MinGW (#4261)
This commit is contained in:
parent
1479b76310
commit
34db4c21b1
@ -186,7 +186,6 @@ if(WIN32)
|
|||||||
ws2_32
|
ws2_32
|
||||||
dbghelp
|
dbghelp
|
||||||
ole32
|
ole32
|
||||||
uuid
|
|
||||||
shell32)
|
shell32)
|
||||||
list(APPEND uv_sources
|
list(APPEND uv_sources
|
||||||
src/win/async.c
|
src/win/async.c
|
||||||
|
|||||||
@ -74,7 +74,7 @@ AM_CONDITIONAL([OS400], [AS_CASE([$host_os],[os400], [true], [false])
|
|||||||
AM_CONDITIONAL([SUNOS], [AS_CASE([$host_os],[solaris*], [true], [false])])
|
AM_CONDITIONAL([SUNOS], [AS_CASE([$host_os],[solaris*], [true], [false])])
|
||||||
AM_CONDITIONAL([WINNT], [AS_CASE([$host_os],[mingw*], [true], [false])])
|
AM_CONDITIONAL([WINNT], [AS_CASE([$host_os],[mingw*], [true], [false])])
|
||||||
AS_CASE([$host_os],[mingw*], [
|
AS_CASE([$host_os],[mingw*], [
|
||||||
LIBS="$LIBS -lws2_32 -lpsapi -liphlpapi -luserenv -luser32 -ldbghelp -lole32 -luuid -lshell32"
|
LIBS="$LIBS -lws2_32 -lpsapi -liphlpapi -luserenv -luser32 -ldbghelp -lole32 -lshell32"
|
||||||
])
|
])
|
||||||
AS_CASE([$host_os], [solaris2.10], [
|
AS_CASE([$host_os], [solaris2.10], [
|
||||||
CFLAGS="$CFLAGS -DSUNOS_NO_IFADDRS"
|
CFLAGS="$CFLAGS -DSUNOS_NO_IFADDRS"
|
||||||
|
|||||||
@ -1212,9 +1212,18 @@ static int uv__kill(HANDLE process_handle, int signum) {
|
|||||||
(PVOID) dump_folder,
|
(PVOID) dump_folder,
|
||||||
&dump_folder_len);
|
&dump_folder_len);
|
||||||
if (ret != ERROR_SUCCESS) {
|
if (ret != ERROR_SUCCESS) {
|
||||||
|
/* Workaround for missing uuid.dll on MinGW. */
|
||||||
|
static const GUID FOLDERID_LocalAppData_libuv = {
|
||||||
|
0xf1b32785, 0x6fba, 0x4fcf,
|
||||||
|
{0x9d, 0x55, 0x7b, 0x8e, 0x7f, 0x15, 0x70, 0x91}
|
||||||
|
};
|
||||||
|
|
||||||
/* Default value for `dump_folder` is `%LOCALAPPDATA%\CrashDumps`. */
|
/* Default value for `dump_folder` is `%LOCALAPPDATA%\CrashDumps`. */
|
||||||
WCHAR* localappdata;
|
WCHAR* localappdata;
|
||||||
SHGetKnownFolderPath(&FOLDERID_LocalAppData, 0, NULL, &localappdata);
|
SHGetKnownFolderPath(&FOLDERID_LocalAppData_libuv,
|
||||||
|
0,
|
||||||
|
NULL,
|
||||||
|
&localappdata);
|
||||||
_snwprintf_s(dump_folder,
|
_snwprintf_s(dump_folder,
|
||||||
sizeof(dump_folder),
|
sizeof(dump_folder),
|
||||||
_TRUNCATE,
|
_TRUNCATE,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user