# HG changeset patch # User Sergey Kandaurov # Date 1554384416 -10800 # Node ID 7da71a7b141abf417d334dfaca8a13f01c9fe3f5 # Parent 52d3600bc25ef478b2fee25056b2db7ab866f424 Win32: preserving binary compatibility with Windows XP - Vista. OpenSSL 1.1.0 and above uses BCrypt if available (Windows 7 or higher). This results in an unusable binary on older Windows versions, when building with newer Windows SDK (such as 7.0A). Using CFLAGS to define _WIN32_WINNT allows to set a desired ABI and make sure the binary works with Windows XP. To not mix with other potential CFLAGS uses, it is set in GNUmakefile. diff --git a/misc/GNUmakefile b/misc/GNUmakefile --- a/misc/GNUmakefile +++ b/misc/GNUmakefile @@ -82,7 +82,8 @@ win32: --with-mail \ --with-stream \ --with-openssl=$(OBJS)/lib/$(OPENSSL) \ - --with-openssl-opt="no-asm no-tests" \ + --with-openssl-opt="no-asm no-tests \ + CFLAGS=-D_WIN32_WINNT=0x0501" \ --with-http_ssl_module \ --with-mail_ssl_module \ --with-stream_ssl_module