aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/amqpcpp/fix-max_min_macros.patch
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/amqpcpp/fix-max_min_macros.patch
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/amqpcpp/fix-max_min_macros.patch')
-rw-r--r--vcpkg/ports/amqpcpp/fix-max_min_macros.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/vcpkg/ports/amqpcpp/fix-max_min_macros.patch b/vcpkg/ports/amqpcpp/fix-max_min_macros.patch
new file mode 100644
index 0000000..4d1e2ae
--- /dev/null
+++ b/vcpkg/ports/amqpcpp/fix-max_min_macros.patch
@@ -0,0 +1,31 @@
+diff --git a/include/amqpcpp/message.h b/include/amqpcpp/message.h
+index 0a35838..96b43e1 100644
+--- a/include/amqpcpp/message.h
++++ b/include/amqpcpp/message.h
+@@ -80,7 +80,7 @@ protected:
+ // safety-check: on 32-bit platforms size_t is obviously also a 32-bit dword
+ // in which case casting the uint64_t to a size_t could result in truncation
+ // here we check whether the given size fits inside a size_t
+- if (std::numeric_limits<size_t>::max() < size) throw std::runtime_error("message is too big for this system");
++ if ((std::numeric_limits<size_t>::max)() < size) throw std::runtime_error("message is too big for this system");
+
+ // store the new size
+ _bodySize = size;
+@@ -98,7 +98,7 @@ protected:
+ if (_mutableBody)
+ {
+ // prevent overflow
+- size = std::min(size, _bodySize - _filled);
++ size = (std::min)(size, _bodySize - _filled);
+
+ // append more data
+ memcpy(_mutableBody + _filled, buffer, (size_t)size);
+@@ -121,7 +121,7 @@ protected:
+ _body = _mutableBody;
+
+ // store the initial data
+- _filled = std::min((size_t)size, (size_t)_bodySize);
++ _filled = (std::min)((size_t)size, (size_t)_bodySize);
+ memcpy(_mutableBody, buffer, _filled);
+ }
+