--- blender-2.90.1/source/blender/blenlib/intern/session_uuid.c.orig	2020-10-09 09:25:13.311584600 +0300
+++ blender-2.90.1/source/blender/blenlib/intern/session_uuid.c	2020-10-09 09:40:37.551118100 +0300
@@ -36,7 +36,11 @@
 SessionUUID BLI_session_uuid_generate(void)
 {
   SessionUUID result;
+#if (LG_SIZEOF_PTR == 8 || LG_SIZEOF_INT == 8)
   result.uuid_ = atomic_add_and_fetch_uint64(&global_session_uuid.uuid_, 1);
+#else
+  result.uuid_ = atomic_add_and_fetch_uint32(&global_session_uuid.uuid_, 1);
+#endif
   if (!BLI_session_uuid_is_generated(&result)) {
     /* Happens when the UUID overflows.
      *
@@ -44,7 +48,11 @@
      * which will overflow the counter once again between the previous call and this one.
      *
      * NOTE: It is possible to have collisions after such overflow. */
+#if (LG_SIZEOF_PTR == 8 || LG_SIZEOF_INT == 8)
     result.uuid_ = atomic_add_and_fetch_uint64(&global_session_uuid.uuid_, 1);
+#else
+    result.uuid_ = atomic_add_and_fetch_uint32(&global_session_uuid.uuid_, 1);
+#endif
   }
   return result;
 }
