# HG changeset patch
# Parent  e5f8d4b1ec854e2665791339fab9d79feca48c57

Index: firefox-102.0/Cargo.lock
===================================================================
--- firefox-102.0.orig/Cargo.lock
+++ firefox-102.0/Cargo.lock
@@ -2847,8 +2847,6 @@ checksum = "349d5a591cd28b49e1d103747161
 [[package]]
 name = "libdbus-sys"
 version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c185b5b7ad900923ef3a8ff594083d4d9b5aea80bb4f32b8342363138c0d456b"
 dependencies = [
  "pkg-config",
 ]
Index: firefox-102.0/Cargo.toml
===================================================================
--- firefox-102.0.orig/Cargo.toml
+++ firefox-102.0/Cargo.toml
@@ -117,6 +117,8 @@ packed_simd = { package = "packed_simd_2
 midir = { git = "https://github.com/mozilla/midir.git", rev = "4c11f0ffb5d6a10de4aff40a7b81218b33b94e6f" }
 minidump_writer_linux = { git = "https://github.com/rust-minidump/minidump-writer.git", rev = "75ada456c92a429704691a85e1cb42fef8cafc0d" }
 glslopt = { path = "third_party/rust/glslopt/" }
+# SLE-11:
+libdbus-sys = { path = "third_party/rust/libdbus-sys" }
 
 # Patch mio 0.6 to use winapi 0.3 and miow 0.3, getting rid of winapi 0.2.
 # There is not going to be new version of mio 0.6, mio now being >= 0.7.11.
Index: firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp
===================================================================
--- firefox-102.0.orig/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp
+++ firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp
@@ -2650,6 +2650,7 @@ get_type_name_for_precision_qualifier(co
    break;
    default:
       unreachable("Unsupported type");
+      return "";
    } /* base type */
    return "";
 }
Index: firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h
===================================================================
--- firefox-102.0.orig/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h
+++ firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h
@@ -141,6 +141,7 @@ _mesa_shader_enum_to_shader_stage(GLenum
       return MESA_SHADER_COMPUTE;
    default:
       unreachable("bad value in _mesa_shader_enum_to_shader_stage()");
+      return MESA_SHADER_NONE;
    }
 }
 
Index: firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/util/u_thread.h
===================================================================
--- firefox-102.0.orig/third_party/rust/glslopt/glsl-optimizer/src/util/u_thread.h
+++ firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/util/u_thread.h
@@ -78,7 +78,9 @@ static inline void u_thread_setname( con
 {
 #if defined(HAVE_PTHREAD)
 #if DETECT_OS_LINUX || DETECT_OS_CYGWIN || DETECT_OS_SOLARIS
-   pthread_setname_np(pthread_self(), name);
+   // SLE-11's glibc is too old, so it doesn't have this function.
+   // So threads have to go without a name.
+   // pthread_setname_np(pthread_self(), name);
 #elif DETECT_OS_FREEBSD || DETECT_OS_OPENBSD
    pthread_set_name_np(pthread_self(), name);
 #elif DETECT_OS_NETBSD
Index: firefox-102.0/third_party/rust/libdbus-sys/build.rs
===================================================================
--- firefox-102.0.orig/third_party/rust/libdbus-sys/build.rs
+++ firefox-102.0/third_party/rust/libdbus-sys/build.rs
@@ -3,7 +3,7 @@ extern crate pkg_config;
 fn main() {
     // See https://github.com/joshtriplett/metadeps/issues/9 for why we don't use
     // metadeps here, but instead keep this manually in sync with Cargo.toml.
-    if let Err(e) = pkg_config::Config::new().atleast_version("1.6").probe("dbus-1") {
+    if let Err(e) = pkg_config::Config::new().atleast_version("1.1").probe("dbus-1") {
         eprintln!("pkg_config failed: {}", e);
         eprintln!(
             "One possible solution is to check whether packages\n\
Index: firefox-102.0/third_party/rust/libdbus-sys/src/lib.rs
===================================================================
--- firefox-102.0.orig/third_party/rust/libdbus-sys/src/lib.rs
+++ firefox-102.0/third_party/rust/libdbus-sys/src/lib.rs
@@ -145,6 +145,11 @@ pub type DBusPendingCallNotifyFunction =
 
 pub type DBusFreeFunction = Option<extern fn(memory: *mut c_void)>;
 
+pub fn dbus_validate_bus_name(busname: *const c_char, error: *mut DBusError) -> u32 { 1 }
+pub fn dbus_validate_interface(interface: *const c_char, error: *mut DBusError) -> u32 { 1 }
+pub fn dbus_validate_member(member: *const c_char, error: *mut DBusError) -> u32 { 1 }
+pub fn dbus_validate_path(path: *const c_char, error: *mut DBusError) -> u32 { 1 }
+
 #[repr(C)]
 pub struct DBusObjectPathVTable {
     pub unregister_function: Option<extern fn(conn: *mut DBusConnection, user_data: *mut c_void)>,
@@ -264,11 +269,7 @@ extern "C" {
 
     pub fn dbus_threads_init_default() -> c_int;
 
-    pub fn dbus_validate_bus_name(busname: *const c_char, error: *mut DBusError) -> u32;
     pub fn dbus_validate_error_name(errorname: *const c_char, error: *mut DBusError) -> u32;
-    pub fn dbus_validate_interface(interface: *const c_char, error: *mut DBusError) -> u32;
-    pub fn dbus_validate_member(member: *const c_char, error: *mut DBusError) -> u32;
-    pub fn dbus_validate_path(path: *const c_char, error: *mut DBusError) -> u32;
 
     pub fn dbus_watch_get_enabled(watch: *mut DBusWatch) -> u32;
     pub fn dbus_watch_get_flags(watch: *mut DBusWatch) -> c_uint;
