Compute Solaris device numbers without libc's private helpers. Related Mozilla import: imports/260513.patch Petr Sumbera, "Bug 2039309 follow-up - avoid Solaris major/minor relocations in libxul", Mon May 18 2026. The libxul version script gives unlisted symbols local binding, so the Solaris major() and minor() macros leave unsatisfied references to their __major and __minor implementations. The public mkdev constants describe the device layout and avoid adding private libc implementation symbols to libxul's ABI. --- firefox-153.0/dom/media/platforms/ffmpeg/FFmpegVulkanVideoDecoder.cpp +++ firefox-153.0/dom/media/platforms/ffmpeg/FFmpegVulkanVideoDecoder.cpp @@ -488,8 +488,17 @@ bool FFmpegVideoDecoder::FFmp if (!aRendererNode.IsEmpty()) { struct stat st = {}; if (stat(aRendererNode.get(), &st) == 0) { +# if defined(XP_SOLARIS) || defined(__sun) + // Avoid the Solaris major()/minor() libc helpers. libxul's version + // script gives unlisted symbols local binding, so references to their + // __major/__minor implementations cannot be satisfied at link time. + rendererDrmMajor = + (static_cast(st.st_rdev) >> NBITSMINOR) & MAXMAJ; + rendererDrmMinor = static_cast(st.st_rdev) & MAXMIN; +# else rendererDrmMajor = major(st.st_rdev); rendererDrmMinor = minor(st.st_rdev); +# endif FFMPEGV_LOG("Renderer device from GPU: {} (major={}, minor={})", aRendererNode.get(), rendererDrmMajor, rendererDrmMinor); } else { --- firefox-3c71a541b0e7ac6e086907b38670dabca9174c45/media/ffvpx/libavutil/hwcontext_vulkan.c.~1~ +++ firefox-3c71a541b0e7ac6e086907b38670dabca9174c45/media/ffvpx/libavutil/hwcontext_vulkan.c @@ -55,6 +55,8 @@ #endif #ifdef __linux__ #include +#elif defined(XP_SOLARIS) || defined(__sun) +#include // major(), minor() for st_rdev #endif #include #include @@ -2217,8 +2219,16 @@ return AVERROR_EXTERNAL; } +# if defined(XP_SOLARIS) || defined(__sun) + // Avoid the Solaris major()/minor() libc helpers. libxul's version + // script gives unlisted symbols local binding, so references to their + // __major/__minor implementations cannot be satisfied at link time. + dev_select.drm_major = ((uint64_t)(drm_node_info.st_dev) >> NBITSMINOR) & MAXMAJ; + dev_select.drm_minor = (uint64_t)(drm_node_info.st_dev) & MAXMIN; +# else dev_select.drm_major = major(drm_node_info.st_dev); dev_select.drm_minor = minor(drm_node_info.st_dev); +# endif dev_select.has_drm = 1; err = drmGetDevice(src_hwctx->fd, &drm_dev_info);