diff --git a/Library/Homebrew/extend/os/linux/system_config.rb b/Library/Homebrew/extend/os/linux/system_config.rb
index 93e87d31196728f8434f4038920b758483c3c696..6916d3d1295617e80d61beb077b3d8d9ff3870ec 100644
--- a/Library/Homebrew/extend/os/linux/system_config.rb
+++ b/Library/Homebrew/extend/os/linux/system_config.rb
@@ -3,7 +3,7 @@
 require "formula"
 require "os/linux/glibc"
 
-class SystemConfig
+module SystemConfig
   class << self
     def host_glibc_version
       version = OS::Linux::Glibc.system_version
diff --git a/Library/Homebrew/extend/os/mac/system_config.rb b/Library/Homebrew/extend/os/mac/system_config.rb
index 5bca79689d8e50ba3a92b94d312b3688050b1f11..da6698fc536781456b4cd71a4caf62a53c6eaed7 100644
--- a/Library/Homebrew/extend/os/mac/system_config.rb
+++ b/Library/Homebrew/extend/os/mac/system_config.rb
@@ -1,6 +1,6 @@
 # frozen_string_literal: true
 
-class SystemConfig
+module SystemConfig
   class << self
     undef describe_java, describe_homebrew_ruby
 
diff --git a/Library/Homebrew/system_config.rb b/Library/Homebrew/system_config.rb
index fd65dc07aa8550fc2fe31703ead27db2c927a761..1b81c7b25c4a905920d1e977dd2f12efea6b8ee8 100644
--- a/Library/Homebrew/system_config.rb
+++ b/Library/Homebrew/system_config.rb
@@ -5,7 +5,10 @@ require "software_spec"
 require "development_tools"
 require "extend/ENV"
 
-class SystemConfig
+# Helper module for querying information about the system configuration.
+#
+# @api private
+module SystemConfig
   class << self
     def clang
       @clang ||= if DevelopmentTools.installed?