]> git.kaiwu.me - nginx.git/commitdiff
Win32: preserving binary compatibility with Windows XP - Vista.
authorSergey Kandaurov <pluknet@nginx.com>
Thu, 4 Apr 2019 13:26:56 +0000 (16:26 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Thu, 4 Apr 2019 13:26:56 +0000 (16:26 +0300)
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.

misc/GNUmakefile

index fc75de502da1aa6feb034fde9293c1f5a15c79a2..241cd4af591466295c8e7aea2e0e8638c3fa349a 100644 (file)
@@ -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