mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 02:48:59 +08:00
[upb] Fixed NAN/INFINITY definitions to work on Windows 11 SDK (#40039)
This commit is contained in:
parent
6fb9a26cf4
commit
90cd8f5a21
17
ports/upb/fix-NAN-on-Win11.patch
Normal file
17
ports/upb/fix-NAN-on-Win11.patch
Normal file
@ -0,0 +1,17 @@
|
||||
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);
|
||||
|
@ -8,6 +8,7 @@ vcpkg_from_github(
|
||||
HEAD_REF main
|
||||
PATCHES
|
||||
fix-cmake.patch
|
||||
fix-NAN-on-Win11.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "upb",
|
||||
"version": "4.25.1",
|
||||
"port-version": 1,
|
||||
"description": "μpb (often written 'upb') is a small protobuf implementation written in C.",
|
||||
"homepage": "https://github.com/protocolbuffers/protobuf",
|
||||
"license": "BSD-2-Clause",
|
||||
|
@ -9062,7 +9062,7 @@
|
||||
},
|
||||
"upb": {
|
||||
"baseline": "4.25.1",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"urdfdom": {
|
||||
"baseline": "3.1.1",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "47d5e848e2c7213cc67e4dfa6c7797fa973f2c12",
|
||||
"version": "4.25.1",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "3edd5c1f37803c69faaf1b0884791e8c1d8ff48f",
|
||||
"version": "4.25.1",
|
||||
|
Loading…
Reference in New Issue
Block a user