changeset 5728:4acad0637cc6

fix build on VS2022
author Alain Mazy <alain@mazy.be>
date Thu, 25 Jul 2024 10:32:24 +0200
parents 843973a0fdfa
children f0ab7a2678fe
files OrthancFramework/Resources/Patches/protobuf-3.5.1.patch
diffstat 1 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Resources/Patches/protobuf-3.5.1.patch	Mon Jul 22 15:55:36 2024 +0200
+++ b/OrthancFramework/Resources/Patches/protobuf-3.5.1.patch	Thu Jul 25 10:32:24 2024 +0200
@@ -2,7 +2,7 @@
 --- protobuf-3.5.1.orig/src/google/protobuf/stubs/io_win32.cc	2023-03-26 20:13:45.095021011 +0200
 +++ protobuf-3.5.1/src/google/protobuf/stubs/io_win32.cc	2023-03-26 20:19:19.932920102 +0200
 @@ -91,7 +91,12 @@
- 
+
  template <typename char_type>
  bool null_or_empty(const char_type* s) {
 -  return s == nullptr || *s == 0;
@@ -13,5 +13,18 @@
 +   **/
 +  return s == NULL || *s == 0;
  }
- 
+
  // Returns true if the path starts with a drive letter, e.g. "c:".
+diff -urEb protobuf-3.5.1.orig/src/google/protobuf/stubs/hash.h protobuf-3.5.1/src/google/protobuf/stubs/hash.h
+--- protobuf-3.5.1.orig/src/google/protobuf/stubs/hash.h	2023-03-26 20:13:45.095021011 +0200
++++ protobuf-3.5.1/src/google/protobuf/stubs/hash.h	2023-03-26 20:19:19.932920102 +0200
+@@ -1,3 +1,9 @@
++#if _MSC_VER >= 1930       // Since Visual Studio 2022
++#define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS
++#include <unordered_map>
++#include <hash_map>
++#endif
++
+ // Protocol Buffers - Google's data interchange format
+ // Copyright 2008 Google Inc.  All rights reserved.
+ // https://developers.google.com/protocol-buffers/
\ No newline at end of file