vcpkg/ports/upb/fix-NAN-on-Win11.patch

18 lines
523 B
Diff
Raw Normal View History

diff --git a/upb/message/message.c b/upb/message/message.c
index 265d30d..afc6e51 100644
--- a/upb/message/message.c
+++ b/upb/message/message.c
@@ -15,9 +15,9 @@
// Must be last.
#include "upb/port/def.inc"
-const float kUpb_FltInfinity = INFINITY;
-const double kUpb_Infinity = INFINITY;
-const double kUpb_NaN = NAN;
+const float kUpb_FltInfinity = (float)(1.0 / 0.0);
+const double kUpb_Infinity = 1.0 / 0.0;
+const double kUpb_NaN = 0.0 / 0.0;
static const size_t overhead = sizeof(upb_Message_InternalData);