public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/tinygltf] f44: Fix i686 build.
@ 2026-11-07 16:10 Jonathan Steffan
  0 siblings, 0 replies; only message in thread
From: Jonathan Steffan @ 2026-11-07 16:10 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/tinygltf
Branch : f44
Commit : 40ed076c7a7a81bf5c037dd39539b92fe646674c
Author : Jonathan Steffan <jsteffan@fedoraproject.org>
Date   : 2026-04-19T12:14:57-06:00
Stats  : +39/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/tinygltf/c/40ed076c7a7a81bf5c037dd39539b92fe646674c?branch=f44

Log:
Fix i686 build.

---
diff --git a/tinygltf-i686-unsigned-int.patch b/tinygltf-i686-unsigned-int.patch
new file mode 100644
index 0000000..963b5ef
--- /dev/null
+++ b/tinygltf-i686-unsigned-int.patch
@@ -0,0 +1,36 @@
+Author: Jonathan Steffan <jsteffan@fedoraproject.org>
+Date:   Sun Apr 19 11:27:53 2026 -0600
+
+    Fix ambiguous tinygltf_json constructor for unsigned int on 32-bit
+    
+    On 32-bit platforms (e.g. i686), size_t is unsigned int rather than
+    uint64_t. SerializeNumberProperty<size_t> therefore instantiates
+    detail::json(unsigned int&), which is ambiguous among the int, int64_t,
+    uint64_t, double, and float constructors -- none is an exact match, and
+    the implicit conversions are equally ranked.
+    
+    Add an explicit unsigned int constructor to tinygltf_json so the call
+    resolves unambiguously on all target widths.
+    
+    Fixes build on i686 / other 32-bit targets.
+
+diff --git a/tinygltf_json.h b/tinygltf_json.h
+index XXXXXXX..XXXXXXX 100644
+--- a/tinygltf_json.h
++++ b/tinygltf_json.h
+@@ -790,6 +790,7 @@ class tinygltf_json {
+     tinygltf_json(bool b);
+     tinygltf_json(int i);
++    tinygltf_json(unsigned int u);
+     tinygltf_json(int64_t i);
+     tinygltf_json(uint64_t u);
+     tinygltf_json(double d);
+     tinygltf_json(float f);
+@@ -1155,6 +1156,7 @@ inline tinygltf_json::tinygltf_json(bool b)     { init_null_(); type_ = CJ_BOOL
+ inline tinygltf_json::tinygltf_json(std::nullptr_t) { init_null_(); }
+ inline tinygltf_json::tinygltf_json(bool b)     { init_null_(); type_ = CJ_BOOL; b_ = b ? 1 : 0; }
+ inline tinygltf_json::tinygltf_json(int i)      { init_null_(); type_ = CJ_INT;  i_ = (int64_t)i; }
++inline tinygltf_json::tinygltf_json(unsigned int u) { init_null_(); type_ = CJ_INT;  i_ = (int64_t)u; }
+ inline tinygltf_json::tinygltf_json(int64_t i)  { init_null_(); type_ = CJ_INT;  i_ = i; }
+ inline tinygltf_json::tinygltf_json(uint64_t u) {
+     init_null_();

diff --git a/tinygltf.spec b/tinygltf.spec
index b8caefe..cdd998f 100644
--- a/tinygltf.spec
+++ b/tinygltf.spec
@@ -17,6 +17,9 @@ License:        MIT
 URL:            https://github.com/syoyo/tinygltf
 Source:         %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
 
+# https://github.com/syoyo/tinygltf/pull/550
+Patch:          tinygltf-i686-unsigned-int.patch
+
 BuildRequires:  cmake
 BuildRequires:  gcc-c++
 BuildRequires:  make

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-07 16:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-07 16:10 [rpms/tinygltf] f44: Fix i686 build Jonathan Steffan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox