summaryrefslogtreecommitdiff
path: root/e_os.h
diff options
context:
space:
mode:
authorTanzinul Islam <tanzinul.islam@gmail.com>2021-04-25 19:59:29 +0100
committerRichard Levitte <levitte@openssl.org>2021-04-27 10:09:26 +0200
commit3e4981dd59d301f60bcc85f7c893db1ee4a21906 (patch)
tree2f7b36bfe2ada69f85f8594fb22c8f3ccd140c3d /e_os.h
parentc85c5e1a5327379306f4c3f8248ace740c64c338 (diff)
downloadopenssl-new-3e4981dd59d301f60bcc85f7c893db1ee4a21906.tar.gz
Avoid #include with inline function on C++Builder
Commit 6b2978406 exposed a bug with C++Builder's Clang-based compilers, which cause inline function definitions in C translation units to not be found by the linker. Disable the inclusion of the triggering header. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15025)
Diffstat (limited to 'e_os.h')
-rw-r--r--e_os.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/e_os.h b/e_os.h
index b19c4829de..8bfc1dcb10 100644
--- a/e_os.h
+++ b/e_os.h
@@ -108,7 +108,14 @@
*/
# include <winsock2.h>
# include <ws2tcpip.h>
-# include <wspiapi.h>
+ /*
+ * Clang-based C++Builder 10.3.3 toolchains cannot find C inline
+ * definitions at link-time. This header defines WspiapiLoad() as an
+ * __inline function. https://quality.embarcadero.com/browse/RSP-33806
+ */
+# if !defined(__BORLANDC__) || !defined(__clang__)
+# include <wspiapi.h>
+# endif
/* yes, they have to be #included prior to <windows.h> */
# endif
# include <windows.h>