From 12bfad9c6d5c0ed51304a89781dd841fffc3dd2b Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Mon, 16 Jan 2017 18:38:06 +0000 Subject: [PATCH] win: define ERROR_ELEVATION_REQUIRED for MinGW MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: https://github.com/libuv/libuv/issues/1194 PR-URL: https://github.com/libuv/libuv/pull/1195 Reviewed-By: Colin Ihrig Reviewed-By: Saúl Ibarra Corretgé --- src/win/winapi.h | 4 ++++ test/test-error.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/win/winapi.h b/src/win/winapi.h index 341fcd08..9401676f 100644 --- a/src/win/winapi.h +++ b/src/win/winapi.h @@ -4606,6 +4606,10 @@ typedef NTSTATUS (NTAPI *sNtQueryDirectoryFile) #endif /* from winerror.h */ +#ifndef ERROR_ELEVATION_REQUIRED +# define ERROR_ELEVATION_REQUIRED 740 +#endif + #ifndef ERROR_SYMLINK_NOT_SUPPORTED # define ERROR_SYMLINK_NOT_SUPPORTED 1464 #endif diff --git a/test/test-error.c b/test/test-error.c index ff53eb1d..a2d559a4 100644 --- a/test/test-error.c +++ b/test/test-error.c @@ -21,6 +21,9 @@ #include "uv.h" #include "task.h" +#if defined(_WIN32) +# include "../src/win/winapi.h" +#endif #include #include