diff --git a/ports/upb/fix-NAN-on-Win11.patch b/ports/upb/fix-NAN-on-Win11.patch new file mode 100644 index 0000000000..7f91c23f9e --- /dev/null +++ b/ports/upb/fix-NAN-on-Win11.patch @@ -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); + diff --git a/ports/upb/portfile.cmake b/ports/upb/portfile.cmake index 4408295c23..9dea497df1 100644 --- a/ports/upb/portfile.cmake +++ b/ports/upb/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_from_github( HEAD_REF main PATCHES fix-cmake.patch + fix-NAN-on-Win11.patch ) vcpkg_check_features( diff --git a/ports/upb/vcpkg.json b/ports/upb/vcpkg.json index 4061b4ca19..bd95e24079 100644 --- a/ports/upb/vcpkg.json +++ b/ports/upb/vcpkg.json @@ -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", diff --git a/versions/baseline.json b/versions/baseline.json index b762eea026..82dc73409f 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -9062,7 +9062,7 @@ }, "upb": { "baseline": "4.25.1", - "port-version": 0 + "port-version": 1 }, "urdfdom": { "baseline": "3.1.1", diff --git a/versions/u-/upb.json b/versions/u-/upb.json index 8391e3f65a..9e0a034c2b 100644 --- a/versions/u-/upb.json +++ b/versions/u-/upb.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "47d5e848e2c7213cc67e4dfa6c7797fa973f2c12", + "version": "4.25.1", + "port-version": 1 + }, { "git-tree": "3edd5c1f37803c69faaf1b0884791e8c1d8ff48f", "version": "4.25.1",