public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jonathan Steffan <jsteffan@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/tinygltf] f44: Fix i686 build.
Date: Sat, 07 Nov 2026 16:10:58 GMT	[thread overview]
Message-ID: <179406785853.1.2528862926064736939.rpms-tinygltf-40ed076c7a7a@fedoraproject.org> (raw)

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

                 reply	other threads:[~2026-11-07 16:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179406785853.1.2528862926064736939.rpms-tinygltf-40ed076c7a7a@fedoraproject.org \
    --to=jsteffan@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox