Subject: Fix FTBFS on 32bit archs
From: "IOhannes m zmölnig (Debian/GNU)"<[email-masked]>
Date: Tue, 27 Jun 2023 14:06:19 +0200

---
 libobs-opengl/gl-egl-common.c | 4 +++-
 libobs/obs.c                  | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

--- obs-studio.orig/libobs-opengl/gl-egl-common.c
+++ obs-studio/libobs-opengl/gl-egl-common.c
@@ -368,16 +368,18 @@
 					      uint64_t **modifiers,
 					      size_t *n_modifiers)
 {
+	EGLuint64KHR n_modifiers_egl = *n_modifiers;
 	if (!glad_eglQueryDmaBufModifiersEXT) {
 		blog(LOG_ERROR, "Unable to load eglQueryDmaBufModifiersEXT");
 		return false;
 	}
 	if (!query_dmabuf_modifiers(egl_display, drm_format, modifiers,
-				    n_modifiers)) {
+				    &n_modifiers_egl)) {
 		*n_modifiers = 0;
 		*modifiers = NULL;
 		return false;
 	}
+	*n_modifiers = n_modifiers_egl;
 	return true;
 }
 
--- obs-studio.orig/libobs/obs.c
+++ obs-studio/libobs/obs.c
@@ -885,7 +885,7 @@
 		obs->video.mixes.array[i] = NULL;
 	}
 	if (num_views > 0)
-		blog(LOG_WARNING, "Number of remaining views: %ld", num_views);
+		blog(LOG_WARNING, "Number of remaining views: %ld", (long int)num_views);
 	pthread_mutex_unlock(&obs->video.mixes_mutex);
 
 	pthread_mutex_destroy(&obs->video.mixes_mutex);