]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Avoid #include with inline function on C++Builder
authorTanzinul Islam <tanzinul.islam@gmail.com>
Sun, 25 Apr 2021 18:59:29 +0000 (19:59 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 27 Apr 2021 08:09:26 +0000 (10:09 +0200)
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)

e_os.h

diff --git a/e_os.h b/e_os.h
index b19c4829de2a5768095112e5cd18a7de5d539f54..8bfc1dcb100aa32745c23c4afb41121ee62f5138 100644 (file)
--- a/e_os.h
+++ b/e_os.h
         */
 #    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>