]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
chore: Prepare for binary patching SYSCONFDIR
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 12 May 2022 18:21:08 +0000 (20:21 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 14 May 2022 18:41:30 +0000 (20:41 +0200)
src/Config.cpp

index ea2c632339194e8fa971843e75fd665f04b197fc..ee4cd9f7f10e21ad8086c45349e27f5f6c835a24 100644 (file)
@@ -53,6 +53,9 @@ using nonstd::optional;
 DLLIMPORT extern char** environ;
 #endif
 
+// Make room for binary patching at install time.
+const char k_sysconfdir[4096 + 1] = SYSCONFDIR;
+
 namespace {
 
 enum class ConfigItem {
@@ -489,7 +492,7 @@ Config::read()
 
     set_secondary_config_path(env_ccache_configpath2
                                 ? env_ccache_configpath2
-                                : FMT("{}/ccache.conf", SYSCONFDIR));
+                                : FMT("{}/ccache.conf", k_sysconfdir));
     MTR_BEGIN("config", "conf_read_secondary");
     // A missing config file in SYSCONFDIR is OK so don't check return value.
     update_from_file(secondary_config_path());