diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-07 08:46:46 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-07 08:46:46 -0400 |
commit | 579770b7068abe3448e0a089ce4b1a4b79f778ac (patch) | |
tree | 6da62aa3a385c71d13558d694a60e47faf12c735 | |
parent | 7e91eb83d84b2fd3992c3c4bba49ffd0acb5db08 (diff) | |
parent | a78504dbe62efac4a8f0ce03f3fb1123bde7c1dd (diff) | |
download | tor-579770b7068abe3448e0a089ce4b1a4b79f778ac.tar.gz tor-579770b7068abe3448e0a089ce4b1a4b79f778ac.zip |
Merge branch 'maint-0.3.4'
-rw-r--r-- | changes/bug27461 | 5 | ||||
-rw-r--r-- | src/core/mainloop/main.c | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/changes/bug27461 b/changes/bug27461 new file mode 100644 index 0000000000..3571ee816a --- /dev/null +++ b/changes/bug27461 @@ -0,0 +1,5 @@ + o Minor bugfixes (compilation): + - Stop calling SetProcessDEPPolicy() on 64-bit Windows. It is not + supported, and always fails. Some compilers warn about the function + pointer cast on 64-bit Windows. + Fixes bug 27461; bugfix on 0.2.2.23-alpha. diff --git a/src/core/mainloop/main.c b/src/core/mainloop/main.c index 2a1ef0ba74..781e093d90 100644 --- a/src/core/mainloop/main.c +++ b/src/core/mainloop/main.c @@ -4212,6 +4212,13 @@ tor_run_main(const tor_main_configuration_t *tor_cfg) #endif /* On heap corruption, just give up; don't try to play along. */ HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0); + + /* SetProcessDEPPolicy is only supported on 32-bit Windows. + * (On 64-bit Windows it always fails, and some compilers don't like the + * PSETDEP cast.) + * 32-bit Windows defines _WIN32. + * 64-bit Windows defines _WIN32 and _WIN64. */ +#ifndef _WIN64 /* Call SetProcessDEPPolicy to permanently enable DEP. The function will not resolve on earlier versions of Windows, and failure is not dangerous. */ @@ -4225,6 +4232,7 @@ tor_run_main(const tor_main_configuration_t *tor_cfg) setdeppolicy(3); } } +#endif /* !defined(_WIN64) */ #endif /* defined(_WIN32) */ { |