view Resources/Patches/google-cloud-cpp-0.10.0.patch @ 40:16cf7c2eb806

sync
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 06 Nov 2020 18:12:00 +0100
parents 11368fbbce2a
children
line wrap: on
line source

diff -urEb google-cloud-cpp-0.10.0.orig/google/cloud/storage/internal/curl_wrappers.h google-cloud-cpp-0.10.0/google/cloud/storage/internal/curl_wrappers.h
--- google-cloud-cpp-0.10.0.orig/google/cloud/storage/internal/curl_wrappers.h	2019-06-20 11:35:05.764399365 +0200
+++ google-cloud-cpp-0.10.0/google/cloud/storage/internal/curl_wrappers.h	2019-06-20 11:35:33.244398885 +0200
@@ -15,6 +15,8 @@
 #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_CURL_WRAPPERS_H_
 #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_CURL_WRAPPERS_H_
 
+#undef BUILDING_LIBCURL   // Necessary for static linking against curl
+
 #include "google/cloud/storage/client_options.h"
 #include "google/cloud/storage/internal/http_response.h"
 #include "google/cloud/storage/version.h"
diff -urEb google-cloud-cpp-0.10.0.orig/google/cloud/storage/internal/openssl_util.cc google-cloud-cpp-0.10.0/google/cloud/storage/internal/openssl_util.cc
--- google-cloud-cpp-0.10.0.orig/google/cloud/storage/internal/openssl_util.cc	2019-06-20 11:35:05.760399365 +0200
+++ google-cloud-cpp-0.10.0/google/cloud/storage/internal/openssl_util.cc	2019-06-20 11:36:06.432398304 +0200
@@ -141,7 +141,7 @@
   }
 
   std::unique_ptr<BIO, decltype(&BIO_free)> source(
-      BIO_new_mem_buf(str.data(), static_cast<int>(str.size())), &BIO_free);
+    BIO_new_mem_buf(const_cast<char*>(str.data()), static_cast<int>(str.size())), &BIO_free);
   auto bio = PushBase64Transcoding(std::move(source));
 
   // We could compute the exact buffer size by looking at the number of padding
@@ -205,7 +205,7 @@
   }
 
   auto pem_buffer = std::unique_ptr<BIO, decltype(&BIO_free)>(
-      BIO_new_mem_buf(pem_contents.data(),
+    BIO_new_mem_buf(const_cast<char*>(pem_contents.data()),
                       static_cast<int>(pem_contents.length())),
       &BIO_free);
   if (!pem_buffer) {