Hi all, When using OpenSSL on Windows, we've seen compiler errors when we #include <openssl/engine.h> after <openssl/x509.h> and then attempting to use X509_NAME in our code.
This is because engine.h pulls in rand.h, which in turn includes windows.h. The Windows headers introduce conflicting #defines for X509_NAME (among other names). Most of the OpenSSL headers counteract this by #undef-ing the conflicting names. However, rand.h includes windows.h *after* ossl_types.h, so Windows re-#defines the symbols and wins again. The attached patch switches include order around so that ossl_types.h is included after windows.h, and thereby fixing the namespace up again. I've built on Windows and Linux and everything still appears to work. Please let me know if this is applicable to mainline OpenSSL. Thanks, - Kim
rand.h-include-order-windows.patch
Description: Binary data
_______________________________________________ openssl-bugs-mod mailing list openssl-bugs-...@openssl.org https://mta.openssl.org/mailman/listinfo/openssl-bugs-mod
_______________________________________________ openssl-dev mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev