From f3a5ee6a9d814376029cae75eaa84a0c7b64e566 Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Wed, 23 Oct 2024 15:27:22 +0800 Subject: [PATCH] fixup --- src/openssl/lib_crypto.cr | 2 ++ src/openssl/lib_ssl.cr | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/openssl/lib_crypto.cr b/src/openssl/lib_crypto.cr index 55551baab988..fecc69ad44fc 100644 --- a/src/openssl/lib_crypto.cr +++ b/src/openssl/lib_crypto.cr @@ -13,6 +13,8 @@ {% end %} {% ssl_version ||= "0.0.0" %} {% else %} + # these have to be wrapped in `sh -c` since for MinGW-w64 the compiler + # passes the command string to `LibC.CreateProcessW` {% from_libressl = (`sh -c 'hash pkg-config 2> /dev/null || printf %s false'` != "false") && (`sh -c 'test -f $(pkg-config --silence-errors --variable=includedir libcrypto)/openssl/opensslv.h || printf %s false'` != "false") && (`sh -c 'printf "#include \nLIBRESSL_VERSION_NUMBER" | ${CC:-cc} $(pkg-config --cflags --silence-errors libcrypto || true) -E -'`.chomp.split('\n').last != "LIBRESSL_VERSION_NUMBER") %} diff --git a/src/openssl/lib_ssl.cr b/src/openssl/lib_ssl.cr index cbf01e41217a..4e7e2def549c 100644 --- a/src/openssl/lib_ssl.cr +++ b/src/openssl/lib_ssl.cr @@ -19,6 +19,8 @@ require "./lib_crypto" {% end %} {% ssl_version ||= "0.0.0" %} {% else %} + # these have to be wrapped in `sh -c` since for MinGW-w64 the compiler + # passes the command string to `LibC.CreateProcessW` {% from_libressl = (`sh -c 'hash pkg-config 2> /dev/null || printf %s false'` != "false") && (`sh -c 'test -f $(pkg-config --silence-errors --variable=includedir libssl)/openssl/opensslv.h || printf %s false'` != "false") && (`sh -c 'printf "#include \nLIBRESSL_VERSION_NUMBER" | ${CC:-cc} $(pkg-config --cflags --silence-errors libssl || true) -E -'`.chomp.split('\n').last != "LIBRESSL_VERSION_NUMBER") %}